Skip to content

Commit 26d1b25

Browse files
committed
add iDeal 2.0
1 parent 844da3a commit 26d1b25

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

Resources/public/css/scss/paument-methods.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,8 @@
5454
display: none;
5555
}
5656
}
57+
}
58+
59+
.hidden {
60+
display: none;
5761
}

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,27 @@ define(function(require) {
3434
* {@inheritdoc}
3535
*/
3636
initialize: function(options) {
37+
this.handleIdealPayment(options);
3738
this.options = _.extend({}, this.options, options);
3839
this.$el = this.options._sourceElement;
3940

4041
mediator.on('checkout:payment:before-transit', this.beforeTransit, this);
4142
},
4243

43-
getSelectedIssuer: function () {
44-
let issuerListContainer = document.querySelector('#' + this.options.paymentMethod + '-issuer-list');
45-
46-
if (!issuerListContainer) {
47-
return null;
48-
}
44+
handleIdealPayment: function(options) {
45+
const paymentMethod = options.paymentMethod;
46+
const sourceElement = options._sourceElement;
4947

50-
let select = issuerListContainer.querySelector('select');
51-
if (select) {
52-
return select.options[select.selectedIndex].value;
48+
if (paymentMethod.includes("ideal")) {
49+
if (sourceElement.length > 0 && sourceElement[0]) {
50+
const issuerList = sourceElement[0];
51+
issuerList.classList.add('hidden');
52+
}
5353
}
54+
},
5455

55-
return issuerListContainer.querySelector(this.options.selectors.issuerList).value;
56+
getSelectedIssuer: function () {
57+
return '';
5658
},
5759

5860
beforeTransit: function(eventData) {

0 commit comments

Comments
 (0)