From c4c4ae2d1e4d4c59c2d02cc792b30ba7effe8297 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Fri, 20 May 2022 15:25:39 +0530 Subject: [PATCH] fixed UPI QR code format --- scripts/fn_ui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/fn_ui.js b/scripts/fn_ui.js index 476f8cd..4780d27 100644 --- a/scripts/fn_ui.js +++ b/scripts/fn_ui.js @@ -45,7 +45,14 @@ function continueWalletTopup() { getRef('topup_wallet__details').innerHTML = `Send ${formatAmount(amount)} to UPI ID below`; getRef('topup_wallet__upi_id').value = cashierUPI[cashier]; getRef('topup_wallet__qr_code').innerHTML = '' - getRef('topup_wallet__qr_code').append(new QRCode(`upi://pay?am=${amount}&pa=${cashierUPI[cashier]}`)) + getRef('topup_wallet__qr_code').append(new QRCode({ + msg: `upi://pay?pn=FLOPay&pa=${cashierUPI[cashier]}&am=${amount}`, + ecl: 'H' + })) + // 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)); + // }).catch(err => console.error(err)); showChildElement('topup_wallet_process', 1) getRef('topup_wallet__txid').focusIn(); }