Commit 8cfb5272 authored by attilak's avatar attilak

Fix LGTM JS issues

parent 96f82040
...@@ -19,8 +19,6 @@ define( ...@@ -19,8 +19,6 @@ define(
* Retrieve the list of available payment methods from the server * Retrieve the list of available payment methods from the server
*/ */
retrieveAvailablePaymentMethods: function () { retrieveAvailablePaymentMethods: function () {
var self = this;
// retrieve payment methods // retrieve payment methods
var serviceUrl, var serviceUrl,
payload; payload;
......
...@@ -68,15 +68,13 @@ define( ...@@ -68,15 +68,13 @@ define(
/** Add view logic here if needed */ /** Add view logic here if needed */
return Component.extend({ return Component.extend({
initialize: function () { initialize: function () {
var self = this;
this._super(); this._super();
adyenPaymentService.retrieveAvailablePaymentMethods().done(function (response) { adyenPaymentService.retrieveAvailablePaymentMethods().done(function (response) {
var responseJson = JSON.parse(response); var responseJson = JSON.parse(response);
var paymentMethodsResponse = responseJson.paymentMethodsResponse; var paymentMethodsResponse = responseJson.paymentMethodsResponse;
var paymentMethods = paymentMethodsResponse.paymentMethods;
// TODO check if this is still required or if can be outsourced for the generic component, or checkout can create a ratepay component // TODO check if this is still required or if can be outsourced for the generic component, or checkout can create a ratepay component
/*if (!!window.checkoutConfig.payment.adyenHpp) { /*if (!!window.checkoutConfig.payment.adyenHpp) {
if (JSON.stringify(paymentMethods).indexOf("ratepay") > -1) { if (JSON.stringify(paymentMethods).indexOf("ratepay") > -1) {
......
...@@ -73,7 +73,6 @@ define( ...@@ -73,7 +73,6 @@ define(
var recurringDetailReference = ko.observable(null); var recurringDetailReference = ko.observable(null);
var variant = ko.observable(null); var variant = ko.observable(null);
var paymentMethod = ko.observable(null); var paymentMethod = ko.observable(null);
var numberOfInstallments = ko.observable(null);
var isValid = ko.observable(false); var isValid = ko.observable(false);
return Component.extend({ return Component.extend({
...@@ -81,7 +80,6 @@ define( ...@@ -81,7 +80,6 @@ define(
template: 'Adyen_Payment/payment/oneclick-form', template: 'Adyen_Payment/payment/oneclick-form',
recurringDetailReference: '', recurringDetailReference: '',
variant: '', variant: '',
numberOfInstallments: '',
checkoutComponent: {}, checkoutComponent: {},
storedPayments: [] storedPayments: []
}, },
...@@ -90,8 +88,7 @@ define( ...@@ -90,8 +88,7 @@ define(
.observe([ .observe([
'recurringDetailReference', 'recurringDetailReference',
'creditCardType', 'creditCardType',
'variant', 'variant'
'numberOfInstallments'
]); ]);
return this; return this;
}, },
...@@ -231,7 +228,7 @@ define( ...@@ -231,7 +228,7 @@ define(
} }
}); });
var oneClickCard = self.checkoutComponent self.checkoutComponent
.create(storedPayment.type, configuration) .create(storedPayment.type, configuration)
.mount('#storedPaymentContainer-' + self.value); .mount('#storedPaymentContainer-' + self.value);
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment