|
|
@@ -79,13 +79,16 @@ class PaymentService
|
|
|
if ($express) {
|
|
|
$this->validateExpressInitiation($cart, $input);
|
|
|
} else {
|
|
|
- if ($input->shippingMethod) {
|
|
|
- if (! Cart::saveShippingMethod($input->shippingMethod)) {
|
|
|
- throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.shipping-method-save-failed'));
|
|
|
- }
|
|
|
+ if(!$cart->shipping_method){
|
|
|
+ if ($input->shippingMethod) {
|
|
|
+ if (! Cart::saveShippingMethod($input->shippingMethod)) {
|
|
|
+ throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.shipping-method-save-failed'));
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
$this->validateStandardInitiation($cart, $input);
|
|
|
Cart::collectTotals();
|
|
|
+ $cart = Cart::getCart();
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -98,7 +101,7 @@ class PaymentService
|
|
|
if (! Cart::savePaymentMethod(['method' => $input->paymentMethod])) {
|
|
|
throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.payment-method-save-failed'));
|
|
|
}
|
|
|
- Cart::collectTotals();
|
|
|
+ // Cart::collectTotals();
|
|
|
$cart = Cart::getCart();
|
|
|
}
|
|
|
|