Guest User

Untitled

a guest
Dec 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public function savePaymentInformationAndPlaceOrder(
  2. $cartId,
  3. $email,
  4. MagentoQuoteApiDataPaymentInterface $paymentMethod,
  5. MagentoQuoteApiDataAddressInterface $billingAddress = null
  6. ) {
  7. $this->savePaymentInformation($cartId, $email, $paymentMethod, $billingAddress);
  8. try {
  9. $orderId = $this->cartManagement->placeOrder($cartId);
  10. } catch (Exception $e) {
  11. // var_dump($e->getMessage());
  12. throw new CouldNotSaveException(
  13. __('An error occurred on the server. Please try to place the order again. errors = %1',$e->getMessage().$billingAddress->getCity()),
  14. $e
  15. );
  16. }
  17. return $orderId;
  18. }
Add Comment
Please, Sign In to add comment