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 600be16c authored by Giorgos Adam's avatar Giorgos Adam

Cancel order on 3D secure failure

parent ca3ab998
...@@ -136,6 +136,9 @@ class Validate3d extends \Magento\Framework\App\Action\Action ...@@ -136,6 +136,9 @@ class Validate3d extends \Magento\Framework\App\Action\Action
$this->_redirect('checkout/onepage/success', ['utm_nooverride' => '1']); $this->_redirect('checkout/onepage/success', ['utm_nooverride' => '1']);
} else { } else {
$order->addStatusHistoryComment(__('3D-secure validation was unsuccessful.'))->save(); $order->addStatusHistoryComment(__('3D-secure validation was unsuccessful.'))->save();
// Move the order from PAYMENT_REVIEW to NEW, so that can be cancelled
$order->setState(\Magento\Sales\Model\Order::STATE_NEW);
$this->_adyenHelper->cancelOrder($order); $this->_adyenHelper->cancelOrder($order);
$this->messageManager->addErrorMessage("3D-secure validation was unsuccessful"); $this->messageManager->addErrorMessage("3D-secure validation was unsuccessful");
......
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