fix bugs
This commit is contained in:
34
upi.html
34
upi.html
@@ -144,6 +144,10 @@
|
||||
background: linear-gradient(135deg, #1a73e8, #34a853);
|
||||
}
|
||||
|
||||
.c-airtel {
|
||||
background: linear-gradient(135deg, #e40000, #ff5252);
|
||||
}
|
||||
|
||||
.c-upi {
|
||||
background: linear-gradient(135deg, #37474f, #78909c);
|
||||
}
|
||||
@@ -230,7 +234,8 @@
|
||||
<div class="link-box" id="link-display"></div>
|
||||
</div>
|
||||
<a class="pay-btn c-paytm" id="pay-btn" href="#">Pay Now</a>
|
||||
<button type="button" class="pay-btn c-phonepe" id="phonepe-bank-btn" style="border:none;font:inherit;">PhonePe 银行卡测试(ACCOUNT)</button>
|
||||
<button type="button" class="pay-btn c-phonepe" id="phonepe-bank-btn" style="border:none;font:inherit;">PhonePe Bank Account Test (ACCOUNT)</button>
|
||||
<button type="button" class="pay-btn c-airtel" id="airtel-bank-btn" style="border:none;font:inherit;">Airtel Transfer to Bank (₹12)</button>
|
||||
</div>
|
||||
|
||||
<div class="qr-wrap">
|
||||
@@ -322,6 +327,21 @@
|
||||
return `phonepe://native?data=${encodeURIComponent(btoa(JSON.stringify(payload)))}&id=p2ppayment`;
|
||||
}
|
||||
|
||||
function airtelBankTransferLink() {
|
||||
const accountNumber = '2053426110';
|
||||
const ifsc = 'KKBK0000811';
|
||||
const bankId = ifsc.slice(0, 4);
|
||||
const amount = '12';
|
||||
const q = new URLSearchParams({
|
||||
screenName: 'transfer_to_bank_acc',
|
||||
bankId,
|
||||
ifsc,
|
||||
accountNumber,
|
||||
amount,
|
||||
});
|
||||
return `myairtel://airtelpay?${q.toString()}`;
|
||||
}
|
||||
|
||||
function phonepeBankAccountTestLink() {
|
||||
const payload = {
|
||||
contact: {
|
||||
@@ -354,7 +374,7 @@
|
||||
gpay: (pa, pn, am, extra) => `gpay://upi/pay?pa=${pa}&pn=${pn}&am=${am}&cu=INR${extra}`,
|
||||
mobikwik: (pa, pn, am, extra) => { const tn = (extra.match(/[?&]tn=([^&]*)/) || [])[1] || 'payment'; return `mobikwik://moneytransfer/upi/verifyVpa?vpa=${encodeURIComponent(pa)}&amount=${am}¬e=${tn}`; },
|
||||
freecharge: (pa, pn, am, extra) => `freechargeupi://pay?pa=${pa}&pn=${pn}&am=${am}&cu=INR${extra}`,
|
||||
// fallback 在 scheduleAutoClick 里处理
|
||||
// fallback handled in scheduleAutoClick
|
||||
upi: (pa, pn, am, extra) => `upi://pay?pa=${pa}&pn=${pn}&am=${am}&cu=INR${extra}`,
|
||||
};
|
||||
|
||||
@@ -393,10 +413,10 @@
|
||||
const warnEl = document.getElementById('warn-box');
|
||||
let warnMsg = w.warn || '';
|
||||
if (walletKey === 'phonepe_biz' && app === 'phonepe') {
|
||||
warnMsg = (warnMsg ? warnMsg + '\n' : '') + '提示:PhonePe Business 建议用 PhonePe (pay) 而非 native p2p。';
|
||||
warnMsg = (warnMsg ? warnMsg + '\n' : '') + 'Tip: PhonePe Business works best with PhonePe (pay), not native p2p.';
|
||||
}
|
||||
if (walletKey === 'phonepe_per' && app === 'phonepe_pay') {
|
||||
warnMsg = (warnMsg ? warnMsg + '\n' : '') + '提示:PhonePe 个人收款建议用 PhonePe (native p2p)。';
|
||||
warnMsg = (warnMsg ? warnMsg + '\n' : '') + 'Tip: PhonePe Personal works best with PhonePe (native p2p).';
|
||||
}
|
||||
if (warnMsg) {
|
||||
warnEl.textContent = warnMsg.startsWith('⚠') ? warnMsg : '⚠ ' + warnMsg;
|
||||
@@ -439,6 +459,12 @@
|
||||
} catch (_) { }
|
||||
});
|
||||
|
||||
document.getElementById('airtel-bank-btn').addEventListener('click', function () {
|
||||
try {
|
||||
window.location.href = airtelBankTransferLink();
|
||||
} catch (_) { }
|
||||
});
|
||||
|
||||
document.getElementById('wallet').addEventListener('change', update);
|
||||
document.getElementById('app').addEventListener('change', update);
|
||||
document.getElementById('amount').addEventListener('input', update);
|
||||
|
||||
Reference in New Issue
Block a user