removed UPI deep link feature
This commit is contained in:
parent
e9fdd209f2
commit
0077223bb3
19
index.html
19
index.html
@ -820,22 +820,7 @@
|
|||||||
</sm-form>
|
</sm-form>
|
||||||
<sm-form id="confirm_topup_form" class="hide">
|
<sm-form id="confirm_topup_form" class="hide">
|
||||||
<h4>Transfer money</h4>
|
<h4>Transfer money</h4>
|
||||||
<div class="grid gap-0-5">
|
<ol type="1">
|
||||||
<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">
|
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
Open your<strong> preferred UPI app </strong>
|
Open your<strong> preferred UPI app </strong>
|
||||||
@ -891,7 +876,7 @@
|
|||||||
After sending money, press <b>Confirm</b>.
|
After sending money, press <b>Confirm</b>.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ol> -->
|
</ol>
|
||||||
<div class="multi-state-button">
|
<div class="multi-state-button">
|
||||||
<button id="topup_wallet_button" class="button button--primary cta" onclick="depositMoneyToWallet()"
|
<button id="topup_wallet_button" class="button button--primary cta" onclick="depositMoneyToWallet()"
|
||||||
type="submit">Confirm</button>
|
type="submit">Confirm</button>
|
||||||
|
|||||||
@ -45,20 +45,18 @@ function continueWalletTopup() {
|
|||||||
if (!cashier)
|
if (!cashier)
|
||||||
return notify("No cashier online. Please try again in a while.", 'error');
|
return notify("No cashier online. Please try again in a while.", 'error');
|
||||||
// const upiId = getRef('select_topup_upi_id').value;
|
// const upiId = getRef('select_topup_upi_id').value;
|
||||||
floGlobals.txCode = randomString(6);
|
const txCode = randomString(6);
|
||||||
// getRef('topup_wallet__code').value = txCode;
|
getRef('topup_wallet__code').value = txCode;
|
||||||
// if (!upiId)
|
// if (!upiId)
|
||||||
// return notify("Please add the UPI ID which you'll use to send the money", 'error');
|
// 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());
|
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
|
||||||
// renderElem(getRef('topup_wallet__details'), html`Enter <b>${formatAmount(amount)}</b> as amount`);
|
renderElem(getRef('topup_wallet__details'), html`Enter <b>${formatAmount(amount)}</b> as amount`);
|
||||||
// getRef('topup_wallet__upi_id').value = cashierUPI[cashier];
|
getRef('topup_wallet__upi_id').value = cashierUPI[cashier];
|
||||||
getRef('topup_wallet__qr_code').innerHTML = ''
|
getRef('topup_wallet__qr_code').innerHTML = ''
|
||||||
getRef('topup_wallet__qr_code').append(new QRCode({
|
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'
|
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)
|
showChildElement('topup_wallet_process', 1)
|
||||||
// getRef('topup_wallet__txid').focusIn();
|
// getRef('topup_wallet__txid').focusIn();
|
||||||
}
|
}
|
||||||
@ -68,16 +66,15 @@ function depositMoneyToWallet() {
|
|||||||
return notify("No cashier online. Please try again in a while.", 'error');
|
return notify("No cashier online. Please try again in a while.", 'error');
|
||||||
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
|
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
|
||||||
// let upiTxID = getRef('topup_wallet__txid').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;
|
// const upiId = getRef('select_topup_upi_id').value;
|
||||||
// if (upiTxID === '')
|
// if (upiTxID === '')
|
||||||
// return notify("Please enter UPI transaction ID", 'error');
|
// return notify("Please enter UPI transaction ID", 'error');
|
||||||
buttonLoader('topup_wallet_button', true);
|
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);
|
console.log(result);
|
||||||
showChildElement('topup_wallet_process', 2);
|
showChildElement('topup_wallet_process', 2);
|
||||||
refreshBalance()
|
refreshBalance()
|
||||||
floGlobals.txCode = ''
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
getRef('topup_failed_reason').textContent = error;
|
getRef('topup_failed_reason').textContent = error;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user