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
f354e475
Commit
f354e475
authored
Jan 16, 2018
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes optimalizations
parent
1b91df43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
35 deletions
+23
-35
view/frontend/web/js/view/payment/method-renderer/adyen-hpp-method.js
...d/web/js/view/payment/method-renderer/adyen-hpp-method.js
+22
-25
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
.../js/view/payment/method-renderer/adyen-oneclick-method.js
+0
-9
view/frontend/web/template/payment/oneclick-form.html
view/frontend/web/template/payment/oneclick-form.html
+1
-1
No files found.
view/frontend/web/js/view/payment/method-renderer/adyen-hpp-method.js
View file @
f354e475
...
...
@@ -42,7 +42,7 @@ define(
var
brandCode
=
ko
.
observable
(
null
);
var
paymentMethod
=
ko
.
observable
(
null
);
var
dfValue
=
ko
.
observable
(
null
);
var
messageComponents
;
return
Component
.
extend
({
self
:
this
,
defaults
:
{
...
...
@@ -128,35 +128,33 @@ define(
document
.
body
.
appendChild
(
dfScriptTag
);
waitForDfSet
();
// create component needs to be in initialize method
var
messageComponents
=
{};
_
.
map
(
response
,
function
(
value
)
{
var
messageContainer
=
new
Messages
();
var
name
=
'
messages-
'
+
value
.
brandCode
;
var
messagesComponent
=
{
parent
:
self
.
name
,
name
:
'
messages-
'
+
value
.
brandCode
,
displayArea
:
'
messages-
'
+
value
.
brandCode
,
component
:
'
Magento_Ui/js/view/messages
'
,
config
:
{
messageContainer
:
messageContainer
}
};
layout
([
messagesComponent
]);
messageComponents
[
name
]
=
messageContainer
;
});
self
.
messageComponents
=
messageComponents
;
fullScreenLoader
.
stopLoader
();
}
).
fail
(
function
(
error
)
{
console
.
log
(
JSON
.
stringify
(
error
));
fullScreenLoader
.
stopLoader
();
});
// create component needs to be in initialize method
var
messageComponents
=
{};
var
paymentMethods
=
adyenPaymentService
.
getAvailablePaymentMethods
();
_
.
map
(
paymentMethods
,
function
(
value
)
{
var
messageContainer
=
new
Messages
();
var
name
=
'
messages-
'
+
value
.
brandCode
;
var
messagesComponent
=
{
parent
:
self
.
name
,
name
:
'
messages-
'
+
value
.
brandCode
,
displayArea
:
'
messages-
'
+
value
.
brandCode
,
component
:
'
Magento_Ui/js/view/messages
'
,
config
:
{
messageContainer
:
messageContainer
}
};
layout
([
messagesComponent
]);
messageComponents
[
name
]
=
messageContainer
;
});
this
.
messageComponents
=
messageComponents
;
},
getAdyenHppPaymentMethods
:
function
()
{
var
self
=
this
;
...
...
@@ -320,7 +318,6 @@ define(
this
.
isPlaceOrderActionAllowed
(
false
);
fullScreenLoader
.
startLoader
();
$
.
when
(
placeOrderAction
(
data
,
messageContainer
)
).
fail
(
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
View file @
f354e475
...
...
@@ -297,21 +297,12 @@ define(
self
.
expiry
(
true
);
return
true
;
},
getRegion
:
function
(
name
)
{
self
.
getRegion
(
name
);
},
getMessageName
:
function
()
{
return
'
messages-
'
+
value
.
reference_id
;
},
getMessageContainer
:
function
()
{
return
messageContainer
;
},
/**
* @return {String}
*/
getBillingAddressFormName
:
function
()
{
return
'
billing-address-form-
'
+
self
.
item
.
method
;
}
}
});
return
paymentList
;
...
...
view/frontend/web/template/payment/oneclick-form.html
View file @
f354e475
...
...
@@ -57,7 +57,7 @@
<!--/ko-->
<div
class=
"payment-method-billing-address"
>
<!-- ko foreach: $parents[1].getRegion(getBillingAddressFormName()) -->
<!-- ko foreach: $parents[1].getRegion(
$parent.
getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
</div>
...
...
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