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 2bfb1528 authored by Fabian Hurnaus's avatar Fabian Hurnaus Committed by GitHub

Only load 'return_path' config data if it's required. (#638)

* Only load 'return_path' config data if it's required.

It doesn't make sense to retrieve the configuration for failure on each request.
It's enough to only do it on failure.

* Update Controller/Process/Result.php
Co-Authored-By: default avatarcyattilakiss <42297201+cyattilakiss@users.noreply.github.com>
parent d8229e87
......@@ -99,8 +99,6 @@ class Result extends \Magento\Framework\App\Action\Action
$response = $this->getRequest()->getParams();
$this->_adyenLogger->addAdyenResult(print_r($response, true));
$failReturnPath = $this->_adyenHelper->getAdyenAbstractConfigData('return_path');
if ($response) {
$result = $this->validateResponse($response);
......@@ -110,10 +108,12 @@ class Result extends \Magento\Framework\App\Action\Action
$this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]);
} else {
$this->_cancel($response);
$failReturnPath = $this->_adyenHelper->getAdyenAbstractConfigData('return_path');
$this->_redirect($failReturnPath);
}
} else {
// redirect to checkout page
$failReturnPath = $this->_adyenHelper->getAdyenAbstractConfigData('return_path');
$this->_redirect($failReturnPath);
}
}
......
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