From 01585877d74749c0d4f725fd9b6cbdafce1d715f Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sat, 11 Nov 2017 22:38:49 +0100 Subject: [PATCH] Fix retrying Stripe checkout payments --- .../static/pretixplugins/stripe/pretix-stripe-checkout.js | 2 +- .../stripe/static/pretixplugins/stripe/pretix-stripe.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe-checkout.js b/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe-checkout.js index 62fb523d69..f6053e1435 100644 --- a/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe-checkout.js +++ b/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe-checkout.js @@ -64,7 +64,7 @@ $(function () { $(".checkout-button-row .btn-primary").click( function (e) { - if (($("input[name=payment][value=stripe]").prop('checked') || $("input[name=payment]").length === 0) + if (($("input[name=payment][value=stripe]").prop('checked') || $("input[type=checkbox][name=payment]").length === 0) && $("#stripe_token").val() == "") { pretixstripe.start(); e.preventDefault(); diff --git a/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js b/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js index beb4698e46..417e418d57 100644 --- a/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js +++ b/src/pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js @@ -151,9 +151,8 @@ $(function () { $('.stripe-container').closest("form").submit( function () { - if (($("input[name=payment][value=stripe]").prop('checked') || $("input[name=payment]").length === 0) + if (($("input[name=payment][value=stripe]").prop('checked') || $("input[name=payment][type=checkbox]").length === 0) && $("#stripe_token").val() == "") { - console.log("foo"); if ($("#stripe-checkout").length) { pretixstripe.show_checkout(); } else {