Skip to content

Commit 1a7f72f

Browse files
committed
add iDeal 2.0. Update issuer fetching.
1 parent 26d1b25 commit 1a7f72f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Resources/public/js/app/components/mollie-issuer.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,17 @@ define(function(require) {
5454
},
5555

5656
getSelectedIssuer: function () {
57-
return '';
57+
let issuerListContainer = document.querySelector('#' + this.options.paymentMethod + '-issuer-list');
58+
if (!issuerListContainer || this.options.paymentMethod.includes("ideal")) {
59+
return '';
60+
}
61+
62+
let select = issuerListContainer.querySelector('select');
63+
if (select) {
64+
return select.options[select.selectedIndex].value;
65+
}
66+
67+
return issuerListContainer.querySelector(this.options.selectors.issuerList).value;
5868
},
5969

6070
beforeTransit: function(eventData) {

0 commit comments

Comments
 (0)