File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 } ,
5454 } ,
5555 function ( form ) {
56+ let preferredCardType = null ;
5657 form . getNumberField ( ) . on ( "input" , function ( e ) {
5758 if ( e . card_number_length == 6 ) {
5859 client . getCardInformation (
@@ -83,13 +84,13 @@ <h4 style="margin: 0 0 10px 0; color: #333;">Select Card Type:</h4>
8384 const radioButtons = radioGroup . querySelectorAll ( 'input[name="cardType"]' )
8485 radioButtons . forEach ( radio => {
8586 radio . addEventListener ( 'change' , function ( ) {
86- window . preferred_card_type = this . value
87- console . log ( "User selected card type:" , window . preferred_card_type )
87+ preferredCardType = this . value
88+ console . log ( "User selected card type:" , preferredCardType )
8889 } )
8990 } )
9091
9192 // Set initial value
92- window . preferred_card_type = null
93+ preferredCardType = null
9394 }
9495 } ,
9596 function ( err ) {
@@ -121,7 +122,7 @@ <h4 style="margin: 0 0 10px 0; color: #333;">Select Card Type:</h4>
121122 {
122123 name : document . getElementById ( "card-form-name" ) . value ,
123124 zip : "10018" ,
124- preferred_card_type : window . preferred_card_type
125+ preferred_card_type : preferredCardType
125126 } ,
126127 function ( token ) {
127128 console . log ( "Tokenization Success" , token )
You can’t perform that action at this time.
0 commit comments