Skip to content

Commit 25b13b5

Browse files
author
Stanislav Idolov
authored
ENGCOM-2862: [Forwardport] Magento PayPal checkout fails if email sending fails / other payment does not #17723
2 parents 4a0c27e + 75e24dd commit 25b13b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/Paypal/Model/Express/Checkout.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,12 @@ public function place($token, $shippingMethodCode = null)
812812
case \Magento\Sales\Model\Order::STATE_PROCESSING:
813813
case \Magento\Sales\Model\Order::STATE_COMPLETE:
814814
case \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW:
815-
if (!$order->getEmailSent()) {
816-
$this->orderSender->send($order);
815+
try {
816+
if (!$order->getEmailSent()) {
817+
$this->orderSender->send($order);
818+
}
819+
} catch (\Exception $e) {
820+
$this->_logger->critical($e);
817821
}
818822
$this->_checkoutSession->start();
819823
break;

0 commit comments

Comments
 (0)