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 1658a1e1 authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Merge pull request #321 from Adyen/PW-382

PW-382 Set IssuerId in checkout
parents 2dce8d69 c5d0d785
...@@ -152,7 +152,6 @@ define( ...@@ -152,7 +152,6 @@ define(
fullScreenLoader.stopLoader(); fullScreenLoader.stopLoader();
} }
).fail(function (error) { ).fail(function (error) {
console.log(JSON.stringify(error));
fullScreenLoader.stopLoader(); fullScreenLoader.stopLoader();
}); });
}, },
...@@ -193,7 +192,19 @@ define( ...@@ -193,7 +192,19 @@ define(
return 4; return 4;
} }
}; };
if (value.brandCode == "ideal") { result.isIssuerListAvailable = function () {
if (value.hasOwnProperty("issuers") && 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) {
...@@ -228,8 +239,10 @@ define( ...@@ -228,8 +239,10 @@ define(
return false; return false;
}; };
} }
return result; return result;
}); });
return paymentList; return paymentList;
}, },
getGenderTypes: function () { getGenderTypes: function () {
...@@ -260,7 +273,7 @@ define( ...@@ -260,7 +273,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 +373,4 @@ define( ...@@ -360,4 +373,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