From 9e33c78ecfe1218073ff996788bcd80d99e99209 Mon Sep 17 00:00:00 2001 From: soyombo Date: Fri, 29 Sep 2023 11:37:21 +0800 Subject: [PATCH] remove debug --- packages/plugin-payment-api/src/controllers.ts | 10 +--------- packages/plugin-payment-api/src/public/js/script.js | 7 ++----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/packages/plugin-payment-api/src/controllers.ts b/packages/plugin-payment-api/src/controllers.ts index ea9329d827..37eb62df07 100644 --- a/packages/plugin-payment-api/src/controllers.ts +++ b/packages/plugin-payment-api/src/controllers.ts @@ -119,15 +119,7 @@ router.post('/gateway/storepay', async (req, res) => { }); router.post('/gateway/updateInvoice', async (req, res) => { - const { - selectedPaymentId, - paymentKind, - invoiceData, - phone, - userAgent - } = req.body; - - console.log('userAgent', userAgent); + const { selectedPaymentId, paymentKind, invoiceData, phone } = req.body; const subdomain = getSubdomain(req); const models = await generateModels(subdomain); diff --git a/packages/plugin-payment-api/src/public/js/script.js b/packages/plugin-payment-api/src/public/js/script.js index 8e29098ad3..2f77c9be57 100644 --- a/packages/plugin-payment-api/src/public/js/script.js +++ b/packages/plugin-payment-api/src/public/js/script.js @@ -21,7 +21,8 @@ async function onPaymentClick(payment, invoiceData, prefix) { /Mobi/.test(navigator.userAgent) || navigator.userAgent === 'Android' || navigator.userAgent === 'iPhone' || - navigator.userAgent === 'Social Pay' + navigator.userAgent === 'Social Pay' || + navigator.userAgent === 'socialpay' ) { isMobile = true; } @@ -58,7 +59,6 @@ async function onPaymentClick(payment, invoiceData, prefix) { selectedPaymentId: paymentObj._id, invoiceData: invoiceObj, paymentKind: paymentObj.kind, - userAgent: navigator.userAgent, }; loader.style.display = 'block'; @@ -201,8 +201,6 @@ async function onPaymentClick(payment, invoiceData, prefix) { window.location.href = apiResponse.deeplink; window.open(apiResponse.deeplink, 'blank'); - - console.log('opening deeplink: ', apiResponse.deeplink); } if (['qpay', 'qpayQuickqr'].includes(data.invoice.paymentKind) && isMobile) { @@ -224,7 +222,6 @@ async function onPaymentClick(payment, invoiceData, prefix) { bankButton.addEventListener('click', function() { window.open(bankUrl.link, 'blank'); window.location.href = bankUrl.link; - console.log(bankUrl.link); }); document.getElementById('bank-buttons').appendChild(bankButton); });