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
2258ec7a
Commit
2258ec7a
authored
May 08, 2018
by
Rik ter Beek
Committed by
GitHub
May 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #271 from ho-nl-fork/return-path
[VM-336] +: Made return path (checkout/cart) configurable
parents
5982aa10
d32f6b26
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
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_checkout_experience.xml
etc/adminhtml/system/adyen_checkout_experience.xml
+5
-1
etc/config.xml
etc/config.xml
+1
-0
No files found.
Controller/Process/Result.php
View file @
2258ec7a
...
...
@@ -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 @
2258ec7a
...
...
@@ -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 @
2258ec7a
...
...
@@ -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_checkout_experience.xml
View file @
2258ec7a
...
...
@@ -37,6 +37,10 @@
<source_model>
Adyen\Payment\Model\Config\Source\RenderMode
</source_model>
<config_path>
payment/adyen_abstract/title_renderer
</config_path>
</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>
</include>
\ No newline at end of file
etc/config.xml
View file @
2258ec7a
...
...
@@ -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