Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
soyombo-baterdene committed Sep 29, 2023
1 parent 3186e12 commit 9e33c78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
10 changes: 1 addition & 9 deletions packages/plugin-payment-api/src/controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 2 additions & 5 deletions packages/plugin-payment-api/src/public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
});
Expand Down

0 comments on commit 9e33c78

Please sign in to comment.