From bc76161a5ce036313854af3cf3c8c2fbbde468dd Mon Sep 17 00:00:00 2001 From: Mike Senior <49071342+itmsenior@users.noreply.github.com> Date: Wed, 27 Apr 2022 15:07:20 +0100 Subject: [PATCH 1/2] Create RegisterCaptureNotificationCommand.php --- .../Order/Payment/State/RegisterCaptureNotificationCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php index ff375c995a183..ead2788081560 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php +++ b/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php @@ -42,7 +42,7 @@ public function __construct(StatusResolver $statusResolver = null) public function execute(OrderPaymentInterface $payment, $amount, OrderInterface $order) { $state = $order->getState(); - if (!$state || $state === Order::STATE_NEW || $state === Order::STATE_PENDING_PAYMENT) { + if (!$state || $state === Order::STATE_NEW || $state === Order::STATE_PENDING_PAYMENT || $state === Order::STATE_PAYMENT_REVIEW) { $state = Order::STATE_PROCESSING; } From 72cfce911efea355ef1a3f8915d0f2ffc1cc8467 Mon Sep 17 00:00:00 2001 From: engcom-Charlie Date: Wed, 1 Jun 2022 19:50:24 +0530 Subject: [PATCH 2/2] 35382 Fixed static test failure --- .../Order/Payment/State/RegisterCaptureNotificationCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php index ead2788081560..b0d0f9a341893 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php +++ b/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php @@ -42,7 +42,8 @@ public function __construct(StatusResolver $statusResolver = null) public function execute(OrderPaymentInterface $payment, $amount, OrderInterface $order) { $state = $order->getState(); - if (!$state || $state === Order::STATE_NEW || $state === Order::STATE_PENDING_PAYMENT || $state === Order::STATE_PAYMENT_REVIEW) { + if (!$state || $state === Order::STATE_NEW || $state === Order::STATE_PENDING_PAYMENT + || $state === Order::STATE_PAYMENT_REVIEW) { $state = Order::STATE_PROCESSING; }