Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function savePaymentInformationAndPlaceOrder(
- $cartId,
- $email,
- MagentoQuoteApiDataPaymentInterface $paymentMethod,
- MagentoQuoteApiDataAddressInterface $billingAddress = null
- ) {
- $this->savePaymentInformation($cartId, $email, $paymentMethod, $billingAddress);
- try {
- $orderId = $this->cartManagement->placeOrder($cartId);
- } catch (Exception $e) {
- // var_dump($e->getMessage());
- throw new CouldNotSaveException(
- __('An error occurred on the server. Please try to place the order again. errors = %1',$e->getMessage().$billingAddress->getCity()),
- $e
- );
- }
- return $orderId;
- }
Add Comment
Please, Sign In to add comment