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 e4a508ed authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #121 from Adyen/cancel-3ds

Cancel order on 3D secure failure
parents ca3ab998 600be16c
...@@ -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