diff --git a/src/templates/payment_form.html b/src/templates/payment_form.html index 489042ed5252817240159304f3c238d78e70ce3b..19732a03a2df9e17029deb1a8da06c5c639babf1 100644 --- a/src/templates/payment_form.html +++ b/src/templates/payment_form.html @@ -125,9 +125,9 @@ document.addEventListener('DOMContentLoaded', async function() { async function handlePaymentMethodSubmission(event, paymentMethod, shouldVerify = true) { event.preventDefault(); + const token = await tokenize(paymentMethod); cardButton.disabled = true; cardButton.innerText = "Processing..."; - const token = await tokenize(paymentMethod); let verificationToken; if (shouldVerify) {