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
31f6fdbe
Commit
31f6fdbe
authored
Jul 26, 2019
by
rikt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues with popup in live
parent
e571a204
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
5 deletions
+35
-5
view/frontend/web/css/styles.css
view/frontend/web/css/styles.css
+9
-0
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
...nd/web/js/view/payment/method-renderer/adyen-cc-method.js
+21
-3
view/frontend/web/template/payment/cc-form.html
view/frontend/web/template/payment/cc-form.html
+5
-2
No files found.
view/frontend/web/css/styles.css
View file @
31f6fdbe
...
...
@@ -1221,3 +1221,12 @@
.threeDS2Modal
.action-close
{
display
:
none
;
}
.threeDS2Modal
#threeDS2Container
{
height
:
100vh
;
}
.adyen-checkout__threeds2
,
.adyen-checkout__threeds2__challenge
{
height
:
100%
;
}
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
View file @
31f6fdbe
...
...
@@ -246,24 +246,40 @@ define(
self
.
threeDS2ChallengeComponent
=
self
.
checkout
.
create
(
'
threeDS2Challenge
'
,
{
challengeToken
:
token
,
size
:
'
05
'
,
onComplete
:
function
(
result
)
{
popupModal
.
modal
(
"
closeModal
"
);
self
.
closeModal
(
popupModal
);
fullScreenLoader
.
startLoader
();
threeds2
.
processThreeDS2
(
result
.
data
).
done
(
function
(
responseJSON
)
{
self
.
validateThreeDS2OrPlaceOrder
(
responseJSON
);
}).
error
(
function
()
{
popupModal
.
modal
(
"
closeModal
"
);
self
.
isPlaceOrderActionAllowed
(
true
);
fullScreenLoader
.
stopLoader
();
});
},
onError
:
function
(
error
)
{
self
.
closeModal
(
popupModal
);
console
.
log
(
JSON
.
stringify
(
error
));
}
});
self
.
threeDS2ChallengeComponent
.
mount
(
threeDS2Node
);
}
},
/**
* This method is a workaround to close the modal in the right way and reconstruct the threeDS2Modal.
* This will solve issues when you cancel the 3DS2 challenge and retry the payment
*/
closeModal
:
function
(
popupModal
)
{
popupModal
.
modal
(
"
closeModal
"
);
$
(
'
.threeDS2Modal
'
).
remove
();
$
(
'
.modals-overlay
'
).
remove
();
// reconstruct the threeDS2Modal container again otherwise component can not find the threeDS2Modal
$
(
'
#threeDS2Wrapper
'
).
append
(
"
<div id=
\"
threeDS2Modal
\"
>
"
+
"
<div id=
\"
threeDS2Container
\"
></div>
"
+
"
</div>
"
);
},
/**
* Builds the payment details part of the payment information reqeust
*
...
...
@@ -369,7 +385,9 @@ define(
if
(
self
.
redirectAfterPlaceOrder
)
{
// use custom redirect Link for supporting 3D secure
window
.
location
.
replace
(
url
.
build
(
window
.
checkoutConfig
.
payment
[
quote
.
paymentMethod
().
method
].
redirectUrl
));
window
.
location
.
replace
(
url
.
build
(
window
.
checkoutConfig
.
payment
[
quote
.
paymentMethod
().
method
].
redirectUrl
)
);
}
}
);
...
...
view/frontend/web/template/payment/cc-form.html
View file @
31f6fdbe
...
...
@@ -77,10 +77,13 @@
<div
afterRender=
"renderSecureFields()"
data-bind=
"attr: { id: 'cardContainer'}"
></div>
</div>
<div
id=
"threeDS2Modal"
>
<div
id=
"threeDS2Container"
></div>
<div
id=
"threeDS2Wrapper"
>
<div
id=
"threeDS2Modal"
>
<div
id=
"threeDS2Container"
></div>
</div>
</div>
<!-- ko if: (hasInstallments())-->
<div
class=
"field required"
...
...
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