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
ce8b167f
Commit
ce8b167f
authored
Jan 15, 2018
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 3D secure, for oneclick show error message in the payment method rather then on top
parent
c0c23405
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
201 additions
and
93 deletions
+201
-93
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
...nd/web/js/view/payment/method-renderer/adyen-cc-method.js
+29
-4
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
.../js/view/payment/method-renderer/adyen-oneclick-method.js
+140
-81
view/frontend/web/template/payment/boleto-form.html
view/frontend/web/template/payment/boleto-form.html
+4
-0
view/frontend/web/template/payment/cc-form.html
view/frontend/web/template/payment/cc-form.html
+9
-1
view/frontend/web/template/payment/oneclick-form.html
view/frontend/web/template/payment/oneclick-form.html
+11
-6
view/frontend/web/template/payment/pos-form.html
view/frontend/web/template/payment/pos-form.html
+5
-0
view/frontend/web/template/payment/sepa-form.html
view/frontend/web/template/payment/sepa-form.html
+3
-1
No files found.
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
View file @
ce8b167f
...
...
@@ -26,10 +26,12 @@ define(
'
Magento_Payment/js/view/payment/cc-form
'
,
'
Magento_Customer/js/model/customer
'
,
'
Magento_Payment/js/model/credit-card-validation/credit-card-data
'
,
'
Magento_Checkout/js/model/payment/additional-validators
'
,
'
Magento_Checkout/js/model/quote
'
,
'
Adyen_Payment/js/model/installments
'
'
Adyen_Payment/js/model/installments
'
,
'
mage/url
'
],
function
(
$
,
ko
,
Component
,
customer
,
creditCardData
,
quote
,
installments
)
{
function
(
$
,
ko
,
Component
,
customer
,
creditCardData
,
additionalValidators
,
quote
,
installments
,
url
)
{
'
use strict
'
;
var
cvcLength
=
ko
.
observable
(
4
);
...
...
@@ -138,6 +140,8 @@ define(
* @override
*/
placeOrder
:
function
(
data
,
event
)
{
var
self
=
this
;
if
(
event
)
{
event
.
preventDefault
();
}
...
...
@@ -158,8 +162,29 @@ define(
var
data
=
cseInstance
.
encrypt
(
cardData
);
this
.
encryptedData
(
data
);
// rest is default placeOrder logic
return
this
.
_super
();
if
(
this
.
validate
()
&&
additionalValidators
.
validate
())
{
this
.
isPlaceOrderActionAllowed
(
false
);
this
.
getPlaceOrderDeferredObject
()
.
fail
(
function
()
{
self
.
isPlaceOrderActionAllowed
(
true
);
}
).
done
(
function
()
{
self
.
afterPlaceOrder
();
if
(
self
.
redirectAfterPlaceOrder
)
{
// use custom redirect Link for supporting 3D secure
window
.
location
.
replace
(
url
.
build
(
window
.
checkoutConfig
.
payment
[
quote
.
paymentMethod
().
method
].
redirectUrl
));
}
}
);
return
true
;
}
return
false
;
},
getControllerName
:
function
()
{
return
window
.
checkoutConfig
.
payment
.
iframe
.
controllerName
[
this
.
getCode
()];
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
View file @
ce8b167f
This diff is collapsed.
Click to expand it.
view/frontend/web/template/payment/boleto-form.html
View file @
ce8b167f
...
...
@@ -55,6 +55,10 @@
'orderSaveUrl':getPlaceOrderUrl(),
}, 'validation':[]}"
>
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<fieldset
data-bind=
"attr: {class: 'fieldset payment items adyen_boleto ' + getCode(), id: 'payment_form_' + getCode()}"
>
<!-- ko if: (isShowLegend())-->
...
...
view/frontend/web/template/payment/cc-form.html
View file @
ce8b167f
...
...
@@ -38,8 +38,9 @@
</div>
<div
class=
"payment-method-content"
>
<div
class=
"payment-method-billing-address"
>
<!-- ko foreach:
$parent.
getRegion(getBillingAddressFormName()) -->
<!-- ko foreach: getRegion(getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
...
...
@@ -53,6 +54,11 @@
}, 'validation':[]}"
>
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<fieldset
data-bind=
"attr: {class: 'fieldset payment items ccard ' + getCode(), id: 'payment_form_' + getCode()}"
>
<!-- ko if: (isShowLegend())-->
...
...
@@ -266,6 +272,8 @@
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<div
class=
"actions-toolbar"
>
<div
class=
"primary"
>
<button
class=
"action primary checkout"
...
...
view/frontend/web/template/payment/oneclick-form.html
View file @
ce8b167f
...
...
@@ -23,9 +23,11 @@
-->
<!-- ko foreach: getAdyenBillingAgreements() -->
<!-- ko foreach: getAdyenBillingAgreements() -->
<div
class=
"payment-method"
data-bind=
"css: {'_active': (value == $parent.isBillingAgreementChecked())}"
>
<div
class=
"payment-method-title field choice"
>
<input
type=
"radio"
name=
"payment[method]"
...
...
@@ -50,12 +52,18 @@
</div>
<div
class=
"payment-method-content"
>
<!-- ko foreach: $parent.getRegion(getMessageName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<div
class=
"payment-method-billing-address"
>
<!-- ko foreach: $parents[1].getRegion(
$parent.
getBillingAddressFormName()) -->
<!-- ko foreach: $parents[1].getRegion(getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<form
class=
"form"
action=
"#"
method=
"post"
data-bind=
"
attr: {'id': 'adyen_oneclick_' + value, 'data-role': 'adyen_oneclick_' + value },
mageInit: {
...
...
@@ -221,9 +229,6 @@
<!-- /ko -->
</fieldset>
<div
class=
"checkout-agreements-block"
>
<!-- ko foreach: $parents[1].getRegion('before-place-order') -->
...
...
@@ -235,7 +240,7 @@
<button
class=
"action primary checkout"
type=
"submit"
data-bind=
"
click:
$parent.
placeOrder,
click: placeOrder,
attr: {title: $t('Place Order')},
enable: (value == $parent.isBillingAgreementChecked())
"
...
...
view/frontend/web/template/payment/pos-form.html
View file @
ce8b167f
...
...
@@ -45,6 +45,11 @@
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<fieldset
class=
"fieldset"
data-bind=
'attr: {id: "payment_form_" + getCode()}'
>
<div
class=
"payment-method-note"
>
<!-- ko text: $t('You will be redirected to the Adyen App.') --><!-- /ko -->
...
...
view/frontend/web/template/payment/sepa-form.html
View file @
ce8b167f
...
...
@@ -46,7 +46,9 @@
<!--/ko-->
</div>
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<form
class=
"form"
id=
"adyen-sepa-form"
data-role=
"adyen-sepa-form"
action=
"#"
method=
"post"
data-bind=
"mageInit: {
'transparent':{
...
...
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