diff --git a/lib/views/frontend/spree/checkout/payment/_stripe.html.erb b/lib/views/frontend/spree/checkout/payment/_stripe.html.erb index 6673b999..dfce1e4c 100644 --- a/lib/views/frontend/spree/checkout/payment/_stripe.html.erb +++ b/lib/views/frontend/spree/checkout/payment/_stripe.html.erb @@ -60,12 +60,13 @@ Spree.stripePaymentMethod.prepend("
"); $('#checkout_form_payment [data-hook=buttons]').click(function (e) { - e.preventDefault(); var expiration, params; $('#stripeError').hide(); Spree.stripePaymentMethod.find('#card_number, #card_expiry, #card_code').removeClass('error'); if (Spree.stripePaymentMethod.is(':visible')) { + e.preventDefault(); + expiration = $('.cardExpiry:visible').payment('cardExpiryVal'); params = $.extend({ number: $('.cardNumber:visible').val(),