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
fc5ce129
Commit
fc5ce129
authored
Oct 30, 2019
by
attilak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix cancel for order
- Fix scrolling issue after failed 3ds2 validation
parent
01997eee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
Model/AdyenThreeDS2Process.php
Model/AdyenThreeDS2Process.php
+5
-4
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
...nd/web/js/view/payment/method-renderer/adyen-cc-method.js
+3
-1
No files found.
Model/AdyenThreeDS2Process.php
View file @
fc5ce129
...
...
@@ -145,12 +145,13 @@ class AdyenThreeDS2Process implements AdyenThreeDS2ProcessInterface
if
(
$result
[
'resultCode'
]
!=
'Authorised'
)
{
$this
->
checkoutSession
->
restoreQuote
();
if
(
$order
->
canCancel
())
{
$order
->
cancel
();
}
else
{
$this
->
adyenLogger
->
addDebug
(
'Order '
.
$order
->
getId
()
.
' can not be canceled'
);
// Always cancel the order if the paymenth has failed
if
(
!
$order
->
canCancel
())
{
$order
->
setState
(
\Magento\Sales\Model\Order
::
STATE_NEW
);
}
$order
->
cancel
()
->
save
();
throw
new
\Magento\Framework\Exception\LocalizedException
(
__
(
'The payment is REFUSED.'
));
}
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
View file @
fc5ce129
...
...
@@ -200,6 +200,7 @@ define(
.
create
(
'
threeDS2DeviceFingerprint
'
,
{
fingerprintToken
:
token
,
onComplete
:
function
(
result
)
{
self
.
threeDS2IdentifyComponent
.
unmount
();
threeds2
.
processThreeDS2
(
result
.
data
).
done
(
function
(
responseJSON
)
{
self
.
validateThreeDS2OrPlaceOrder
(
responseJSON
)
}).
fail
(
function
(
result
)
{
...
...
@@ -235,6 +236,7 @@ define(
challengeToken
:
token
,
size
:
'
05
'
,
onComplete
:
function
(
result
)
{
self
.
threeDS2ChallengeComponent
.
unmount
();
self
.
closeModal
(
popupModal
);
fullScreenLoader
.
startLoader
();
...
...
@@ -247,7 +249,6 @@ define(
});
},
onError
:
function
(
error
)
{
self
.
closeModal
(
popupModal
);
console
.
log
(
JSON
.
stringify
(
error
));
}
});
...
...
@@ -262,6 +263,7 @@ define(
popupModal
.
modal
(
"
closeModal
"
);
$
(
'
.threeDS2Modal
'
).
remove
();
$
(
'
.modals-overlay
'
).
remove
();
$
(
'
body
'
).
removeClass
(
'
_has-modal
'
);
// reconstruct the threeDS2Modal container again otherwise component can not find the threeDS2Modal
$
(
'
#threeDS2Wrapper
'
).
append
(
"
<div id=
\"
threeDS2Modal
\"
>
"
+
...
...
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