File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 54
54
display : none ;
55
55
}
56
56
}
57
+ }
58
+
59
+ .hidden {
60
+ display : none ;
57
61
}
Original file line number Diff line number Diff line change @@ -34,25 +34,27 @@ define(function(require) {
34
34
* {@inheritdoc }
35
35
*/
36
36
initialize : function ( options ) {
37
+ this . handleIdealPayment ( options ) ;
37
38
this . options = _ . extend ( { } , this . options , options ) ;
38
39
this . $el = this . options . _sourceElement ;
39
40
40
41
mediator . on ( 'checkout:payment:before-transit' , this . beforeTransit , this ) ;
41
42
} ,
42
43
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 ;
49
47
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
+ }
53
53
}
54
+ } ,
54
55
55
- return issuerListContainer . querySelector ( this . options . selectors . issuerList ) . value ;
56
+ getSelectedIssuer : function ( ) {
57
+ return '' ;
56
58
} ,
57
59
58
60
beforeTransit : function ( eventData ) {
You can’t perform that action at this time.
0 commit comments