We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 9589d4a5 authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

PW-818: Fix for Magento 2.3 compatibility (#357)

* PW-818: Fix for Magento 2.3 compatibility

* Set only the isAjax param instead of setting everything again
parent 305271ec
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
namespace Adyen\Payment\Controller\Process; namespace Adyen\Payment\Controller\Process;
use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Exception\Exception;
use Magento\Framework\App\Request\Http as HttpRequest;
/** /**
* Class Json * Class Json
...@@ -69,6 +70,14 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -69,6 +70,14 @@ class Json extends \Magento\Framework\App\Action\Action
$this->_resultFactory = $context->getResultFactory(); $this->_resultFactory = $context->getResultFactory();
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_adyenLogger = $adyenLogger; $this->_adyenLogger = $adyenLogger;
// 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);
}
}
} }
/** /**
......
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