Skip to content
Snippets Groups Projects
Commit 78bcbd1b authored by bird's avatar bird
Browse files

fix: only lock payment button once client side error checking passes

parent abc8c1e0
Branches
1 merge request!12Integrate new Square Payments API
...@@ -125,9 +125,9 @@ document.addEventListener('DOMContentLoaded', async function() { ...@@ -125,9 +125,9 @@ document.addEventListener('DOMContentLoaded', async function() {
async function handlePaymentMethodSubmission(event, paymentMethod, shouldVerify = true) { async function handlePaymentMethodSubmission(event, paymentMethod, shouldVerify = true) {
event.preventDefault(); event.preventDefault();
const token = await tokenize(paymentMethod);
cardButton.disabled = true; cardButton.disabled = true;
cardButton.innerText = "Processing..."; cardButton.innerText = "Processing...";
const token = await tokenize(paymentMethod);
let verificationToken; let verificationToken;
if (shouldVerify) { if (shouldVerify) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment