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

don't execute 3D logic if 3D secure payment was already successful

parent f28f657a
...@@ -89,10 +89,11 @@ class Validate3d extends \Magento\Framework\App\Action\Action ...@@ -89,10 +89,11 @@ class Validate3d extends \Magento\Framework\App\Action\Action
if ($order->getPayment()) { if ($order->getPayment()) {
$active = $order->getPayment()->getAdditionalInformation('3dActive'); $active = $order->getPayment()->getAdditionalInformation('3dActive');
$success = $order->getPayment()->getAdditionalInformation('3dSuccess');
} }
// check if 3D secure is active. If not just go to success page // check if 3D secure is active. If not just go to success page
if ($active) { if ($active && $success != true) {
$this->_adyenLogger->addAdyenResult("3D secure is active"); $this->_adyenLogger->addAdyenResult("3D secure is active");
...@@ -131,6 +132,7 @@ class Validate3d extends \Magento\Framework\App\Action\Action ...@@ -131,6 +132,7 @@ class Validate3d extends \Magento\Framework\App\Action\Action
$order->addStatusHistoryComment(__('3D-secure validation was successful'))->save(); $order->addStatusHistoryComment(__('3D-secure validation was successful'))->save();
// set back to false so when pressed back button on the success page it will reactivate 3D secure // set back to false so when pressed back button on the success page it will reactivate 3D secure
$order->getPayment()->setAdditionalInformation('3dActive', ''); $order->getPayment()->setAdditionalInformation('3dActive', '');
$order->getPayment()->setAdditionalInformation('3dSuccess', true);
$this->_orderRepository->save($order); $this->_orderRepository->save($order);
$this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]); $this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]);
......
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