|
|
@@ -80,7 +80,14 @@ class PaymentService
|
|
|
$this->validateExpressInitiation($cart, $input);
|
|
|
} else {
|
|
|
if(!$cart->shipping_method){
|
|
|
+
|
|
|
if ($input->shippingMethod) {
|
|
|
+
|
|
|
+ if (! \Webkul\Shipping\Facades\Shipping::isMethodCodeExists($input->shippingMethod)) {
|
|
|
+ throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.invalid-shipping-method'));
|
|
|
+ }
|
|
|
+ \Webkul\Shipping\Facades\Shipping::collectRates();
|
|
|
+
|
|
|
if (! Cart::saveShippingMethod($input->shippingMethod)) {
|
|
|
throw new OperationFailedException(__('bagistoapi::app.graphql.checkout.shipping-method-save-failed'));
|
|
|
}
|