Skip to content

Commit

Permalink
Merge pull request #347 from spark-solutions/sd-784
Browse files Browse the repository at this point in the history
[SD-784] Cannot complete checkout with "Check" Payment method
  • Loading branch information
Piotr Milewski authored Feb 13, 2020
2 parents 74bcb75 + d268462 commit 0f026fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/views/frontend/spree/checkout/payment/_stripe.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@
Spree.stripePaymentMethod.prepend("<div id='stripeError' class='errorExplanation alert alert-danger' style='display:none'></div>");

$('#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(),
Expand Down

0 comments on commit 0f026fc

Please sign in to comment.