We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 5c5b4c20 authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

PW-291: on OFFER_CLOSED, cancel the order (#196)

* PW-291: on OFFER_CLOSED, cancel the order

* PW-291: set state to NEW, only necessary for 3d secure transactions.

* PW-291: added comment for 3ds workaround
parent fbb6d058
......@@ -751,6 +751,13 @@ class Cron
$this->_authorizePayment();
}
break;
case Notification::OFFER_CLOSED:
if(!$this->_order->canCancel()) {
// Move the order from PAYMENT_REVIEW to NEW, so that can be cancelled
$this->_order->setState(\Magento\Sales\Model\Order::STATE_NEW);
}
$this->_holdCancelOrder(true);
break;
case Notification::CAPTURE_FAILED:
case Notification::CANCELLATION:
case Notification::CANCELLED:
......
......@@ -48,6 +48,7 @@ class Notification extends \Magento\Framework\Model\AbstractModel
const RECURRING_CONTRACT = "RECURRING_CONTRACT";
const REPORT_AVAILABLE = "REPORT_AVAILABLE";
const ORDER_CLOSED = "ORDER_CLOSED";
const OFFER_CLOSED = "OFFER_CLOSED";
/**
* Notification constructor.
......
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