Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Adyen Magento2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared Libs
Adyen Magento2
Commits
22b67e98
Commit
22b67e98
authored
May 07, 2018
by
Maikel Koek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[VM-336] +: Made return path (checkout/cart) configurable
parent
5982aa10
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
Controller/Process/Result.php
Controller/Process/Result.php
+4
-2
Controller/Process/ResultPos.php
Controller/Process/ResultPos.php
+1
-1
Controller/Process/Validate3d.php
Controller/Process/Validate3d.php
+1
-1
etc/adminhtml/system/adyen_required_settings.xml
etc/adminhtml/system/adyen_required_settings.xml
+5
-0
etc/config.xml
etc/config.xml
+1
-0
No files found.
Controller/Process/Result.php
View file @
22b67e98
...
...
@@ -91,6 +91,8 @@ 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
);
...
...
@@ -100,11 +102,11 @@ class Result extends \Magento\Framework\App\Action\Action
$this
->
_redirect
(
'checkout/onepage/success'
,
[
'_query'
=>
[
'utm_nooverride'
=>
'1'
]]);
}
else
{
$this
->
_cancel
(
$response
);
$this
->
_redirect
(
'checkout/cart'
);
$this
->
_redirect
(
$failReturnPath
);
}
}
else
{
// redirect to checkout page
$this
->
_redirect
(
'checkout/cart'
);
$this
->
_redirect
(
$failReturnPath
);
}
}
...
...
Controller/Process/ResultPos.php
View file @
22b67e98
...
...
@@ -98,7 +98,7 @@ class ResultPos extends \Magento\Framework\App\Action\Action
$this
->
_redirect
(
'checkout/onepage/success'
,
[
'_query'
=>
[
'utm_nooverride'
=>
'1'
]]);
}
else
{
$this
->
_cancel
(
$response
);
$this
->
_redirect
(
'checkout/cart'
);
$this
->
_redirect
(
$this
->
_adyenHelper
->
getAdyenAbstractConfigData
(
'return_path'
)
);
}
}
...
...
Controller/Process/Validate3d.php
View file @
22b67e98
...
...
@@ -150,7 +150,7 @@ class Validate3d extends \Magento\Framework\App\Action\Action
// restore the quote
$session
->
restoreQuote
();
$this
->
_redirect
(
'checkout/cart'
);
$this
->
_redirect
(
$this
->
_adyenHelper
->
getAdyenAbstractConfigData
(
'return_path'
)
);
}
}
}
else
{
...
...
etc/adminhtml/system/adyen_required_settings.xml
View file @
22b67e98
...
...
@@ -106,5 +106,10 @@
<source_model>
Magento\Config\Model\Config\Source\Yesno
</source_model>
<config_path>
payment/adyen_abstract/debug
</config_path>
</field>
<field
id=
"return_path"
translate=
"label"
type=
"text"
sortOrder=
"150"
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>
</include>
\ No newline at end of file
etc/config.xml
View file @
22b67e98
...
...
@@ -35,6 +35,7 @@
<title_renderer>
title_image
</title_renderer>
<sepa_flow>
sale
</sepa_flow>
<split_payments_refund_strategy>
1
</split_payments_refund_strategy>
<return_path>
checkout/cart
</return_path>
<group>
adyen
</group>
</adyen_abstract>
<adyen_cc>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment