File tree Expand file tree Collapse file tree
app/views/spree/braintree_vzero Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 < img src ="https://www.paypalobjects.com/en_US/i/btn/btn_xpressCheckout.gif " id ="btnOpenFlow ">
55 </ div >
66
7- < script src ="https://js.braintreegateway.com/v2/braintree.js "> </ script >
7+ < script src ="https://js.braintreegateway.com/v2/braintree.js " onload =" braintreeLoaded() " > </ script >
88 < script src ="https://js.braintreegateway.com/js/braintree-2.32.1.min.js "> </ script >
99
1010 < script type ="text/javascript ">
8484 document . querySelector ( '#btnOpenFlow' ) . addEventListener ( 'click' , function ( ) { checkout . paypal . initAuthFlow ( ) ; } , false ) ;
8585 }
8686
87- if ( document . readyState !== 'loading' ) {
88- initBraintreePayPal ( )
89- } else {
90- window . addEventListener ( 'DOMContentLoaded' , initBraintreePayPal ) ;
87+ function braintreeLoaded ( ) {
88+ if ( document . readyState !== 'loading' ) {
89+ initBraintreePayPal ( )
90+ } else {
91+ window . addEventListener ( 'DOMContentLoaded' , initBraintreePayPal ) ;
92+ }
9193 }
9294
9395 function initBraintreePayPal ( ) {
You can’t perform that action at this time.
0 commit comments