Skip to content

Commit 6737a7b

Browse files
authored
Merge pull request #40 from logeecom/add-ideal-2.0-method
Add ideal 2.0 method
2 parents ebe8792 + 645c81c commit 6737a7b

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
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: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,29 @@ 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

44+
handleIdealPayment: function(options) {
45+
const paymentMethod = options.paymentMethod;
46+
const sourceElement = options._sourceElement;
47+
48+
if (paymentMethod.includes("ideal")) {
49+
if (sourceElement.length > 0 && sourceElement[0]) {
50+
const issuerList = sourceElement[0];
51+
issuerList.classList.add('hidden');
52+
}
53+
}
54+
},
55+
4356
getSelectedIssuer: function () {
4457
let issuerListContainer = document.querySelector('#' + this.options.paymentMethod + '-issuer-list');
45-
46-
if (!issuerListContainer) {
47-
return null;
58+
if (!issuerListContainer || this.options.paymentMethod.includes("ideal")) {
59+
return '';
4860
}
4961

5062
let select = issuerListContainer.querySelector('select');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mollie/orocommerce",
3-
"version": "5.1.0",
3+
"version": "5.2.0",
44
"type": "symfony-bundle",
55
"description": "Mollie Payment Module for OroCommerce",
66
"keywords": [

0 commit comments

Comments
 (0)