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 2258ec7a authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #271 from ho-nl-fork/return-path

[VM-336] +: Made return path (checkout/cart) configurable
parents 5982aa10 d32f6b26
...@@ -91,6 +91,8 @@ class Result extends \Magento\Framework\App\Action\Action ...@@ -91,6 +91,8 @@ class Result extends \Magento\Framework\App\Action\Action
$response = $this->getRequest()->getParams(); $response = $this->getRequest()->getParams();
$this->_adyenLogger->addAdyenResult(print_r($response, true)); $this->_adyenLogger->addAdyenResult(print_r($response, true));
$failReturnPath = $this->_adyenHelper->getAdyenAbstractConfigData('return_path');
if ($response) { if ($response) {
$result = $this->validateResponse($response); $result = $this->validateResponse($response);
...@@ -100,11 +102,11 @@ class Result extends \Magento\Framework\App\Action\Action ...@@ -100,11 +102,11 @@ class Result extends \Magento\Framework\App\Action\Action
$this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]); $this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]);
} else { } else {
$this->_cancel($response); $this->_cancel($response);
$this->_redirect('checkout/cart'); $this->_redirect($failReturnPath);
} }
} else { } else {
// redirect to checkout page // redirect to checkout page
$this->_redirect('checkout/cart'); $this->_redirect($failReturnPath);
} }
} }
......
...@@ -98,7 +98,7 @@ class ResultPos extends \Magento\Framework\App\Action\Action ...@@ -98,7 +98,7 @@ class ResultPos extends \Magento\Framework\App\Action\Action
$this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]); $this->_redirect('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]);
} else { } else {
$this->_cancel($response); $this->_cancel($response);
$this->_redirect('checkout/cart'); $this->_redirect($this->_adyenHelper->getAdyenAbstractConfigData('return_path'));
} }
} }
......
...@@ -150,7 +150,7 @@ class Validate3d extends \Magento\Framework\App\Action\Action ...@@ -150,7 +150,7 @@ class Validate3d extends \Magento\Framework\App\Action\Action
// restore the quote // restore the quote
$session->restoreQuote(); $session->restoreQuote();
$this->_redirect('checkout/cart'); $this->_redirect($this->_adyenHelper->getAdyenAbstractConfigData('return_path'));
} }
} }
} else { } else {
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
<source_model>Adyen\Payment\Model\Config\Source\RenderMode</source_model> <source_model>Adyen\Payment\Model\Config\Source\RenderMode</source_model>
<config_path>payment/adyen_abstract/title_renderer</config_path> <config_path>payment/adyen_abstract/title_renderer</config_path>
</field> </field>
<field id="return_path" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Checkout Return Path</label>
<config_path>payment/adyen_abstract/return_path</config_path>
<tooltip><![CDATA[The path the customer will be redirected to when payment was <b>not</b> successful. Default is <i>checkout/cart</i>.]]></tooltip>
</field>
</group> </group>
</include> </include>
\ No newline at end of file
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<title_renderer>title_image</title_renderer> <title_renderer>title_image</title_renderer>
<sepa_flow>sale</sepa_flow> <sepa_flow>sale</sepa_flow>
<split_payments_refund_strategy>1</split_payments_refund_strategy> <split_payments_refund_strategy>1</split_payments_refund_strategy>
<return_path>checkout/cart</return_path>
<group>adyen</group> <group>adyen</group>
</adyen_abstract> </adyen_abstract>
<adyen_cc> <adyen_cc>
......
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