We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit ca9405d0 authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

PW-1918: fixes #489, order was not cancelled when in Payment review state and...

PW-1918: fixes #489, order was not cancelled when in Payment review state and AUTHORISATION false is processed (#598)
parent baa308e7
......@@ -414,6 +414,10 @@ class Cron
if ($previousAdyenEventCode != "AUTHORISATION : TRUE" ||
$this->_eventCode == Notification::ORDER_CLOSED
) {
// Move the order from PAYMENT_REVIEW to NEW, so that can be cancelled
if ($this->_order->getState() === \Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW) {
$this->_order->setState(\Magento\Sales\Model\Order::STATE_NEW);
}
$this->_holdCancelOrder(false);
} else {
$this->_order->setData('adyen_notification_event_code', $previousAdyenEventCode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment