We will be off on April 7th (Monday) for public holiday 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
$this->_redirect('checkout/onepage/success', ['utm_nooverride' => '1']);
} else {
$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->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