- Go to the file : vendor/magento/module-checkout/Model/PaymentInformationManagement.php
vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php - Change function savePaymentInformationAndPlaceOrder() from
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
/** * {@inheritDoc} */ public function savePaymentInformationAndPlaceOrder( $cartId, \Magento\Quote\Api\Data\PaymentInterface $paymentMethod, \Magento\Quote\Api\Data\AddressInterface $billingAddress = null ) { $this->savePaymentInformation($cartId, $paymentMethod, $billingAddress); try { $orderId = $this->cartManagement->placeOrder($cartId); } catch (\Exception $e) { throw new CouldNotSaveException( __('An error occurred on the server. Please try to place the order again.'), $e ); } return $orderId; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
/** * {@inheritDoc} */ public function savePaymentInformationAndPlaceOrder( $cartId, \Magento\Quote\Api\Data\PaymentInterface $paymentMethod, \Magento\Quote\Api\Data\AddressInterface $billingAddress = null ) { $this->savePaymentInformation($cartId, $paymentMethod, $billingAddress); try { $orderId = $this->cartManagement->placeOrder($cartId); } catch (\Exception $e) { throw new CouldNotSaveException( $e ); } return $orderId; } |
Thank for reading this post, Hope it helps.