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 cc77e62f authored by Scott Powell's avatar Scott Powell Committed by GitHub

Merge pull request #363 from Adyen/3ds-fix

PW-882: Fix 3dsecure for M2.3, fix captureonshipment
parents eb2dd086 4fac680e
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
namespace Adyen\Payment\Controller\Process; namespace Adyen\Payment\Controller\Process;
use Magento\Framework\App\Request\Http as HttpRequest;
class Validate3d extends \Magento\Framework\App\Action\Action class Validate3d extends \Magento\Framework\App\Action\Action
{ {
...@@ -75,6 +76,13 @@ class Validate3d extends \Magento\Framework\App\Action\Action ...@@ -75,6 +76,13 @@ class Validate3d extends \Magento\Framework\App\Action\Action
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_paymentRequest = $paymentRequest; $this->_paymentRequest = $paymentRequest;
$this->_orderRepository = $orderRepository; $this->_orderRepository = $orderRepository;
// Fix for Magento2.3 adding isAjax to the request params
if(interface_exists("\Magento\Framework\App\CsrfAwareActionInterface")) {
$request = $this->getRequest();
if ($request instanceof HttpRequest && $request->isPost()) {
$request->setParam('isAjax', true);
}
}
} }
/** /**
......
...@@ -54,7 +54,7 @@ class BeforeShipmentObserver extends AbstractDataAssignObserver ...@@ -54,7 +54,7 @@ class BeforeShipmentObserver extends AbstractDataAssignObserver
{ {
$shipment = $observer->getEvent()->getShipment(); $shipment = $observer->getEvent()->getShipment();
$order = $shipment->getOrder(); $order = $shipment->getOrder();
$captureOnShipment = $this->_adyenHelper->getConfigData('capture_on_shipment', 'adyen_abstract', $order->getStoreId()); $captureOnShipment = $this->adyenHelper->getConfigData('capture_on_shipment', 'adyen_abstract', $order->getStoreId());
if ($this->isPaymentMethodAdyen($order) && $captureOnShipment) { if ($this->isPaymentMethodAdyen($order) && $captureOnShipment) {
$payment = $order->getPayment(); $payment = $order->getPayment();
......
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