removed UPI deep link feature

This commit is contained in:
sairaj mote 2022-06-05 19:13:39 +05:30
parent e9fdd209f2
commit 0077223bb3
2 changed files with 9 additions and 27 deletions

View File

@ -820,22 +820,7 @@
</sm-form>
<sm-form id="confirm_topup_form" class="hide">
<h4>Transfer money</h4>
<div class="grid gap-0-5">
<a id="pay_by_upi" href="" class="button button--primary cta text-center"
style="padding: 0.8rem">Pay using UPI
apps</a>
<p>*Only for mobile users with UPI apps installed. <br> All the required details will be auto
filled.</p>
</div>
<div class="text-center">OR</div>
<div class="text-center justify-center grid gap-0-5">
<p>Scan QR code below with an UPI app</p>
<div id="topup_wallet__qr_code" style="justify-self: center"></div>
</div>
<p class="warning">
After sending money, press <b>Confirm</b>.
</p>
<!-- <ol type="1">
<ol type="1">
<li>
<p>
Open your<strong> preferred UPI app </strong>
@ -891,7 +876,7 @@
After sending money, press <b>Confirm</b>.
</p>
</li>
</ol> -->
</ol>
<div class="multi-state-button">
<button id="topup_wallet_button" class="button button--primary cta" onclick="depositMoneyToWallet()"
type="submit">Confirm</button>

View File

@ -45,20 +45,18 @@ function continueWalletTopup() {
if (!cashier)
return notify("No cashier online. Please try again in a while.", 'error');
// const upiId = getRef('select_topup_upi_id').value;
floGlobals.txCode = randomString(6);
// getRef('topup_wallet__code').value = txCode;
const 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');
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
// renderElem(getRef('topup_wallet__details'), html`Enter <b>${formatAmount(amount)}</b> as amount`);
// getRef('topup_wallet__upi_id').value = cashierUPI[cashier];
renderElem(getRef('topup_wallet__details'), html`Enter <b>${formatAmount(amount)}</b> as amount`);
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=${floGlobals.txCode}`,
msg: `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}&tn=${txCode}`,
ecl: 'H'
}))
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,16 +66,15 @@ 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, floGlobals.txCode/* , upiId */).then(result => {
User.cashToToken(cashier, amount, 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;