Added link to open UPI apps directly from web app

This commit is contained in:
sairaj mote 2022-05-11 00:15:53 +05:30
parent 9bb8ad39eb
commit a8f3787041
5 changed files with 15 additions and 8 deletions

View File

@ -64,6 +64,7 @@ a {
a:focus-visible {
box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
}
a.button {
padding: 0.4rem 0.6rem;
border-radius: 0.3rem;
@ -103,7 +104,7 @@ button:not(:disabled) {
background-color: rgba(var(--text-color), 0.06);
}
.button--primary, .button--danger {
color: rgba(var(--background-color), 1);
color: rgba(var(--background-color), 1) !important;
}
.button--primary .icon, .button--danger .icon {
fill: rgba(var(--background-color), 1);

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -97,7 +97,7 @@ button {
background-color: rgba(var(--text-color), 0.06);
&--primary,
&--danger {
color: rgba(var(--background-color), 1);
color: rgba(var(--background-color), 1) !important;
.icon {
fill: rgba(var(--background-color), 1);
}

View File

@ -155,11 +155,11 @@
</header>
<section id="home" class="inner-page hide">
<div id="user" class="hide grid user-element">
<div class="grid">
<h5>My FLO ID</h5>
<sm-copy class="logged-in-user-id" style="font-size: 0.9rem;"></sm-copy>
</div>
<div id="wallet_section" class="grid gap-1">
<div class="grid">
<h5>My FLO ID</h5>
<sm-copy class="logged-in-user-id" style="font-size: 0.9rem;"></sm-copy>
</div>
<h4>My wallet</h4>
<div class="grid gap-0-5">
<h5>Balance</h5>
@ -745,7 +745,12 @@
<div id="topup_wallet__qr_code"></div>
</div>
<sm-copy id="topup_wallet__upi_id" style="font-weight: 700;"></sm-copy>
<a href="upi://pay?pa=UPIID@oksbi&amp;cu=INR">Pay Now !</a>
<div class="grid">
<a id="topup_wallet__app_link" class="button button--primary">Pay with
supported
UPI apps</a>
<p>*Requires UPI apps installed on device</p>
</div>
</div>
<p>After sending money, please enter the transaction ID of completed transaction.</p>
<sm-input id="topup_wallet__txid" minlength="12" maxlength="12"

View File

@ -44,6 +44,7 @@ function continueWalletTopup() {
let amount = parseFloat(getRef('request_cashier_amount').value.trim());
getRef('topup_wallet__details').innerHTML = `Send <b>${formatAmount(amount)}</b> to UPI ID below`;
getRef('topup_wallet__upi_id').value = cashierUPI[cashier];
getRef('topup_wallet__app_link').href = `upi://pay?pa=${cashierUPI[cashier]}&amp;cu=INR`;
fetch(`https://upiqr.in/api/qr?name=cashier&vpa=${cashierUPI[cashier]}`).then(res => {
res.text().then(data => getRef('topup_wallet__qr_code').innerHTML = data)
.catch(err => console.error(err));