|
@@ -79,10 +79,17 @@ class PaymentService
|
|
|
if ($express) {
|
|
if ($express) {
|
|
|
$this->validateExpressInitiation($cart, $input);
|
|
$this->validateExpressInitiation($cart, $input);
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ if ($input->shippingMethod) {
|
|
|
|
|
+ if (! Cart::saveShippingMethod($input->shippingMethod)) {
|
|
|
|
|
+ throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.shipping-method-save-failed'));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
$this->validateStandardInitiation($cart, $input);
|
|
$this->validateStandardInitiation($cart, $input);
|
|
|
Cart::collectTotals();
|
|
Cart::collectTotals();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (! $input->paymentMethod && ! $cart->payment?->method) {
|
|
if (! $input->paymentMethod && ! $cart->payment?->method) {
|
|
|
throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.payment-method-required'));
|
|
throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.payment-method-required'));
|
|
|
}
|
|
}
|