From a5cd29faa0ba41ab878a57c0698ed07d1acc46e4 Mon Sep 17 00:00:00 2001 From: Jason Woods Date: Thu, 11 Jan 2018 14:48:19 +0200 Subject: [PATCH] Magento PayPal checkout fails if email sending fails / other payment method does not --- app/code/Magento/Paypal/Model/Express/Checkout.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Paypal/Model/Express/Checkout.php b/app/code/Magento/Paypal/Model/Express/Checkout.php index 9c9b4dc3e87a7..701bba9cf76cb 100644 --- a/app/code/Magento/Paypal/Model/Express/Checkout.php +++ b/app/code/Magento/Paypal/Model/Express/Checkout.php @@ -810,7 +810,11 @@ public function place($token, $shippingMethodCode = null) case \Magento\Sales\Model\Order::STATE_COMPLETE: case \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW: if (!$order->getEmailSent()) { - $this->orderSender->send($order); + try { + $this->orderSender->send($order); + } catch (\Exception $e) { + $this->_logger->critical($e); + } } $this->_checkoutSession->start(); break;