From b26f6ce5f1ed8e0a3be004c67644f5a7681fbdea Mon Sep 17 00:00:00 2001 From: sriramv Date: Sat, 24 Jun 2023 15:18:13 +0530 Subject: [PATCH] paymentError:gwm --- app/Views/checkout.php | 8 +------- public/square-js/sq-card-pay.js | 6 ++++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/Views/checkout.php b/app/Views/checkout.php index c3be836..0aa5556 100644 --- a/app/Views/checkout.php +++ b/app/Views/checkout.php @@ -330,13 +330,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https - + diff --git a/public/square-js/sq-card-pay.js b/public/square-js/sq-card-pay.js index ad405f9..744d12f 100644 --- a/public/square-js/sq-card-pay.js +++ b/public/square-js/sq-card-pay.js @@ -23,7 +23,7 @@ async function CardPay(fieldEl, buttonEl) { try { const result = await card.tokenize(); - + // console.log(result); if (result.status === 'OK') { $('#loading-spinner-overlay').css('visibility', 'visible'); // Use global method from sq-payment-flow.js @@ -31,7 +31,9 @@ async function CardPay(fieldEl, buttonEl) { } } catch (e) { if (e.message) { - window.showError(`Error: ${e.message}`); + // console.log(e.message); + // window.showError(`Error: ${e.message}`); + window.showError(`The request is already in process`); } else { window.showError('Something went wrong'); }