diff --git a/app/assets/javascripts/spree/frontend/spree_braintree_vzero.js b/app/assets/javascripts/spree/frontend/spree_braintree_vzero.js index 1e3bd980..d827ae41 100644 --- a/app/assets/javascripts/spree/frontend/spree_braintree_vzero.js +++ b/app/assets/javascripts/spree/frontend/spree_braintree_vzero.js @@ -46,7 +46,8 @@ SpreeBraintreeVzero = { } } -$(document).ready(function() { +$(document).ready(function () { + var event = new Event('spreebraintree:ready'); paymentMethods = $('div[data-hook="checkout_payment_step"] input[type="radio"]').click(function (e) { SpreeBraintreeVzero.setSaveAndContinueVisibility(); }); @@ -65,4 +66,5 @@ $(document).ready(function() { SpreeBraintreeVzero.addDeviceData(); }); SpreeBraintreeVzero.setSaveAndContinueVisibility(); + window.dispatchEvent(event); }) diff --git a/app/views/spree/braintree_vzero/_paypal_checkout.html.erb b/app/views/spree/braintree_vzero/_paypal_checkout.html.erb index b3621fb7..780e8fd5 100644 --- a/app/views/spree/braintree_vzero/_paypal_checkout.html.erb +++ b/app/views/spree/braintree_vzero/_paypal_checkout.html.erb @@ -9,7 +9,7 @@ <% end %> diff --git a/app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb b/app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb index 4f05923a..3cacffb7 100644 --- a/app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb +++ b/app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb @@ -1,252 +1,258 @@