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
cea55f4b
Commit
cea55f4b
authored
Jul 21, 2017
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#89 add support for devicefingerprint to support ratepay
parent
6b457dcd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
Block/Redirect/Redirect.php
Block/Redirect/Redirect.php
+6
-2
Observer/AdyenHppDataAssignObserver.php
Observer/AdyenHppDataAssignObserver.php
+3
-1
view/frontend/requirejs-config.js
view/frontend/requirejs-config.js
+2
-1
view/frontend/web/js/view/payment/method-renderer/adyen-hpp-method.js
...d/web/js/view/payment/method-renderer/adyen-hpp-method.js
+15
-8
No files found.
Block/Redirect/Redirect.php
View file @
cea55f4b
...
...
@@ -297,9 +297,13 @@ class Redirect extends \Magento\Payment\Block\Form
$formFields
[
'deliveryAddressType'
]
=
"1"
;
// make setting to make this optional
$
ady
Fields
[
'shopperType'
]
=
"1"
;
$
form
Fields
[
'shopperType'
]
=
"1"
;
}
if
(
$this
->
_order
->
getPayment
()
->
getAdditionalInformation
(
"df_value"
)
!=
""
)
{
$formFields
[
'dfValue'
]
=
$this
->
_order
->
getPayment
()
->
getAdditionalInformation
(
"df_value"
);
}
// Sort the array by key using SORT_STRING order
ksort
(
$formFields
,
SORT_STRING
);
...
...
Observer/AdyenHppDataAssignObserver.php
View file @
cea55f4b
...
...
@@ -36,6 +36,7 @@ class AdyenHppDataAssignObserver extends AbstractDataAssignObserver
const
GENDER
=
'gender'
;
const
DOB
=
'dob'
;
const
TELEPHONE
=
'telephone'
;
const
DF_VALUE
=
'df_value'
;
/**
...
...
@@ -46,7 +47,8 @@ class AdyenHppDataAssignObserver extends AbstractDataAssignObserver
self
::
ISSUER_ID
,
self
::
GENDER
,
self
::
DOB
,
self
::
TELEPHONE
self
::
TELEPHONE
,
self
::
DF_VALUE
];
/**
...
...
view/frontend/requirejs-config.js
View file @
cea55f4b
...
...
@@ -6,7 +6,8 @@
/*global alert*/
var
config
=
{
paths
:
{
'
adyen/encrypt
'
:
'
Adyen_Payment/js/view/payment/adyen.encrypt.min
'
'
adyen/encrypt
'
:
'
Adyen_Payment/js/view/payment/adyen.encrypt.min
'
,
'
adyen/df
'
:
'
https://live.adyen.com/hpp/js/df
'
},
config
:
{
mixins
:
{
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-hpp-method.js
View file @
cea55f4b
...
...
@@ -35,12 +35,14 @@ define(
'
Magento_Checkout/js/model/url-builder
'
,
'
Adyen_Payment/js/model/adyen-payment-service
'
,
'
Magento_Customer/js/model/customer
'
,
'
Magento_Checkout/js/model/full-screen-loader
'
'
Magento_Checkout/js/model/full-screen-loader
'
,
'
adyen/df
'
],
function
(
ko
,
$
,
Component
,
setPaymentMethodAction
,
selectPaymentMethodAction
,
quote
,
checkoutData
,
additionalValidators
,
storage
,
urlBuilder
,
adyenPaymentService
,
customer
,
fullScreenLoader
)
{
function
(
ko
,
$
,
Component
,
setPaymentMethodAction
,
selectPaymentMethodAction
,
quote
,
checkoutData
,
additionalValidators
,
storage
,
urlBuilder
,
adyenPaymentService
,
customer
,
fullScreenLoader
,
deviceFingerprint
)
{
'
use strict
'
;
var
brandCode
=
ko
.
observable
(
null
);
var
paymentMethod
=
ko
.
observable
(
null
);
var
dfValue
=
ko
.
observable
(
null
);
return
Component
.
extend
({
self
:
this
,
...
...
@@ -55,7 +57,8 @@ define(
'
issuerId
'
,
'
gender
'
,
'
dob
'
,
'
telephone
'
'
telephone
'
,
'
dfValue
'
]);
return
this
;
},
...
...
@@ -89,6 +92,12 @@ define(
).
done
(
function
(
response
)
{
adyenPaymentService
.
setPaymentMethods
(
response
);
// set device fingerprint value
dfSet
(
'
dfValue
'
,
0
);
// propagate this manually to knockoutjs otherwise it would not work
dfValue
(
$
(
'
#dfValue
'
).
val
());
fullScreenLoader
.
stopLoader
();
}
).
fail
(
function
(
error
)
{
...
...
@@ -114,7 +123,6 @@ define(
return
self
.
validate
();
}
if
(
value
.
brandCode
==
"
ideal
"
)
{
result
.
issuerIds
=
value
.
issuers
;
result
.
issuerId
=
ko
.
observable
(
null
);
...
...
@@ -155,13 +163,12 @@ define(
if
(
this
.
validate
()
&&
additionalValidators
.
validate
())
{
var
data
=
{};
data
.
method
=
self
.
method
;
data
.
po_number
=
null
;
var
additionalData
=
{};
additionalData
.
brand_code
=
self
.
value
;
additionalData
.
df_value
=
dfValue
();
if
(
brandCode
()
==
"
ideal
"
)
{
additionalData
.
issuer_id
=
this
.
issuerId
();
...
...
@@ -187,7 +194,7 @@ define(
"
method
"
:
self
.
method
,
"
po_number
"
:
null
,
"
additional_data
"
:
{
brand_code
:
self
.
value
,
brand_code
:
self
.
value
}
};
...
...
@@ -205,7 +212,7 @@ define(
isBrandCodeChecked
:
ko
.
computed
(
function
()
{
if
(
!
quote
.
paymentMethod
())
{
return
null
;
return
null
;
}
if
(
quote
.
paymentMethod
().
method
==
paymentMethod
())
{
...
...
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