We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 20281dc8 authored by attilak's avatar attilak

Remove IDEAL check when filtering the available payment methods

Let other payment methods also use the issuer drop down list
parent 2dce8d69
...@@ -152,7 +152,7 @@ define( ...@@ -152,7 +152,7 @@ define(
fullScreenLoader.stopLoader(); fullScreenLoader.stopLoader();
} }
).fail(function (error) { ).fail(function (error) {
console.log(JSON.stringify(error)); //console.log(JSON.stringify(error));
fullScreenLoader.stopLoader(); fullScreenLoader.stopLoader();
}); });
}, },
...@@ -193,10 +193,22 @@ define( ...@@ -193,10 +193,22 @@ define(
return 4; return 4;
} }
}; };
if (value.brandCode == "ideal") { result.isIssuerListAvailable = function () {
if (typeof value.issuers !== 'undefined' && value.issuers.length > 0) {
return true;
}
return false;
};
if (value.hasOwnProperty("issuers")) {
if (value.issuers.length == 0) {
return false;
}
result.issuerIds = value.issuers; result.issuerIds = value.issuers;
result.issuerId = ko.observable(null); result.issuerId = ko.observable(null);
} else if (value.isPaymentMethodOpenInvoiceMethod) { }else if (value.isPaymentMethodOpenInvoiceMethod) {
result.telephone = ko.observable(quote.shippingAddress().telephone); result.telephone = ko.observable(quote.shippingAddress().telephone);
result.gender = ko.observable(window.checkoutConfig.payment.adyenHpp.gender); result.gender = ko.observable(window.checkoutConfig.payment.adyenHpp.gender);
result.dob = ko.observable(window.checkoutConfig.payment.adyenHpp.dob); result.dob = ko.observable(window.checkoutConfig.payment.adyenHpp.dob);
...@@ -228,8 +240,10 @@ define( ...@@ -228,8 +240,10 @@ define(
return false; return false;
}; };
} }
return result; return result;
}); });
return paymentList; return paymentList;
}, },
getGenderTypes: function () { getGenderTypes: function () {
...@@ -260,7 +274,7 @@ define( ...@@ -260,7 +274,7 @@ define(
additionalData.brand_code = self.value; additionalData.brand_code = self.value;
additionalData.df_value = dfValue(); additionalData.df_value = dfValue();
if (brandCode() == "ideal") { if (self.isIssuerListAvailable()) {
additionalData.issuer_id = this.issuerId(); additionalData.issuer_id = this.issuerId();
} }
else if (self.isPaymentMethodOpenInvoiceMethod()) { else if (self.isPaymentMethodOpenInvoiceMethod()) {
...@@ -360,4 +374,4 @@ define( ...@@ -360,4 +374,4 @@ define(
} }
}); });
} }
); );
\ No newline at end of file
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<form class="form" data-role="adyen-hpp-form" action="#" method="post" data-bind="mageInit: { 'validation':[]}, attr: {id: 'payment_form_' + $parent.getCode() + '_' + value}"> <form class="form" data-role="adyen-hpp-form" action="#" method="post" data-bind="mageInit: { 'validation':[]}, attr: {id: 'payment_form_' + $parent.getCode() + '_' + value}">
<fieldset class="fieldset" data-bind='attr: {id: "payment_fieldset_" + $parent.getCode() + "_" + value}'> <fieldset class="fieldset" data-bind='attr: {id: "payment_fieldset_" + $parent.getCode() + "_" + value}'>
<!-- ko if: value == 'ideal' --> <!-- ko if: isIssuerListAvailable() -->
<label data-bind="attr: {'for': 'issuerId'}" class="label"> <label data-bind="attr: {'for': 'issuerId'}" class="label">
<span><!-- ko text: $t('Select Your Bank') --><!-- /ko --></span> <span><!-- ko text: $t('Select Your Bank') --><!-- /ko --></span>
</label> </label>
......
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