chengwl hace 1 semana
padre
commit
6926704da1

+ 2 - 2
packages/Webkul/BagistoApi/src/Dto/SaveCheckoutCartInput.php

@@ -28,6 +28,6 @@ class SaveCheckoutCartInput
 
     #[Groups(['mutation'])]
     #[ApiProperty(description: 'Payment method code. Pass "-1" to leave unchanged.')]
-    #[SerializedName('code')]
-    public ?string $code = null;
+    #[SerializedName('paymentMethod')]
+    public ?string $paymentMethod = null;
 }

+ 2 - 2
packages/Webkul/BagistoApi/src/State/SaveCheckoutCartProcessor.php

@@ -63,8 +63,8 @@ class SaveCheckoutCartProcessor implements ProcessorInterface
                 $this->applyShippingMethod((string) $data->shippingMethod);
             }
 
-            if ($this->shouldUpdate($data->code)) {
-                $this->applyPaymentMethod((string) $data->code);
+            if ($this->shouldUpdate($data->paymentMethod)) {
+                $this->applyPaymentMethod((string) $data->paymentMethod);
             }
 
             if ($this->shouldUpdate($data->couponCode)) {