bug fix
This commit is contained in:
parent
51f0f3adb9
commit
e9fdd209f2
@ -45,7 +45,7 @@ function continueWalletTopup() {
|
||||
if (!cashier)
|
||||
return notify("No cashier online. Please try again in a while.", 'error');
|
||||
// const upiId = getRef('select_topup_upi_id').value;
|
||||
const txCode = randomString(6);
|
||||
floGlobals.txCode = randomString(6);
|
||||
// getRef('topup_wallet__code').value = txCode;
|
||||
// if (!upiId)
|
||||
// return notify("Please add the UPI ID which you'll use to send the money", 'error');
|
||||
@ -54,10 +54,10 @@ function continueWalletTopup() {
|
||||
// getRef('topup_wallet__upi_id').value = cashierUPI[cashier];
|
||||
getRef('topup_wallet__qr_code').innerHTML = ''
|
||||
getRef('topup_wallet__qr_code').append(new QRCode({
|
||||
msg: `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}&tn=${txCode}`,
|
||||
msg: `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}&tn=${floGlobals.txCode}`,
|
||||
ecl: 'H'
|
||||
}))
|
||||
getRef('pay_by_upi').href = `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}&tn=${txCode}`
|
||||
getRef('pay_by_upi').href = `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}&tn=${floGlobals.txCode}`
|
||||
getRef('pay_by_upi').textContent = `Pay ${formatAmount(amount)} by UPI`;
|
||||
showChildElement('topup_wallet_process', 1)
|
||||
// getRef('topup_wallet__txid').focusIn();
|
||||
@ -68,15 +68,16 @@ function depositMoneyToWallet() {
|
||||
return notify("No cashier online. Please try again in a while.", 'error');
|
||||
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
|
||||
// let upiTxID = getRef('topup_wallet__txid').value.trim();
|
||||
const txCode = getRef('topup_wallet__code').value;
|
||||
// const txCode = getRef('topup_wallet__code').value;
|
||||
// const upiId = getRef('select_topup_upi_id').value;
|
||||
// if (upiTxID === '')
|
||||
// return notify("Please enter UPI transaction ID", 'error');
|
||||
buttonLoader('topup_wallet_button', true);
|
||||
User.cashToToken(cashier, amount, txCode/* , upiId */).then(result => {
|
||||
User.cashToToken(cashier, amount, floGlobals.txCode/* , upiId */).then(result => {
|
||||
console.log(result);
|
||||
showChildElement('topup_wallet_process', 2);
|
||||
refreshBalance()
|
||||
floGlobals.txCode = ''
|
||||
}).catch(error => {
|
||||
console.error(error)
|
||||
getRef('topup_failed_reason').textContent = error;
|
||||
|
||||
@ -871,6 +871,7 @@ function handleVisibilityChange() {
|
||||
if (document.visibilityState === "hidden") {
|
||||
// code if page is hidden
|
||||
} else {
|
||||
startStatusInterval()
|
||||
if (floGlobals.loaded && floGlobals.isSubAdmin)
|
||||
startStatusInterval()
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user