fix bugs
This commit is contained in:
@@ -441,10 +441,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<PayTmPersonalOTPBind
|
||||
isDebug
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}));
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId }));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showPaytmPersonalBind', 'Paytm Personal OTP')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
@@ -479,10 +481,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<PhonePePersonalOTPBind
|
||||
isDebug
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}));
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId }));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showPhonePePersonalBind', 'PhonePe Personal OTP')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
@@ -499,10 +503,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<PaytmBusinessOTPBind
|
||||
isDebug
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}));
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showPaytmBusinessBind', 'Paytm Business bound successfully')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
@@ -519,10 +525,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<PhonePeBusinessBind
|
||||
isDebug
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}));
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showPhonePeBusinessBind', 'PhonePe Business bound successfully')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
@@ -555,10 +563,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<BharatPeBusinessOTPBind
|
||||
isDebug
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile));
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showBharatPeBusinessBind', 'BharatPe Business bound successfully')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
@@ -575,10 +585,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<MobikwikOTPBind
|
||||
isDebug={true}
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { generateOtpRequestTimeId: p.generateOtpRequestTimeId }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile))
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, p));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showMobikwikPersonalBind', 'Mobikwik bound successfully')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
@@ -611,10 +623,12 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
|
||||
<FreeChargeBind
|
||||
isDebug
|
||||
initialMobile={bindPrefillMobile}
|
||||
onRequestOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile))}
|
||||
onVerifyOTP={async (wt, p) =>
|
||||
this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { otpId: p.otpId, deviceId: p.deviceId, csrfId: p.csrfId, appFc: p.appFc }))}
|
||||
onRequestOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile));
|
||||
}}
|
||||
onVerifyOTP={async (wt, p) => {
|
||||
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { otpId: p.otpId, deviceId: p.deviceId, csrfId: p.csrfId, appFc: p.appFc }));
|
||||
}}
|
||||
onSuccess={this.onOtpBindSuccess('showFreechargePersonalBind', 'Freecharge bound successfully')}
|
||||
onError={() => {}}
|
||||
/>
|
||||
|
||||
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