This commit is contained in:
2026-09-15 23:19:24 +08:00
parent e7e6d95044
commit dc31da7f6e
2 changed files with 8 additions and 21 deletions
+7 -20
View File
@@ -307,35 +307,22 @@
function phonepeNative(pa, pn, am, note) {
const amount = Math.round(Number(am) * 100);
const payload = {
contact: {
contactInfo: {
type: 'VPA',
vpa: pa,
cbsName: pn || '',
nickName: pn || '',
},
p2pPaymentCheckoutParams: {
checkoutType: 'DEFAULT',
sendParams: {
initialAmount: amount,
note: note || 'payment',
// Let PhonePe validate an external VPA instead of treating
// it as an already-known local contact.
isByDefaultKnownContact: false,
shouldShowUnsavedContactBanner: true,
disableViewHistory: true,
showKeyboard: false,
shouldShowMaskedNumber: false,
payContext: {
transferMode: 'PEER_TO_PEER',
message: note || 'payment',
tag: 'Miscellaneous',
},
},
validateDestination: false,
withSheetExpanded: true,
shouldShowUnsavedBanner: false,
};
const jsonBase64 = btoa(unescape(encodeURIComponent(JSON.stringify(payload))));
return `phonepe://native?data=${encodeURIComponent(jsonBase64)}&id=p2ppayment`;
const jsonBase64 = btoa(JSON.stringify(payload));
return `phonepe://native?data=${encodeURIComponent(jsonBase64)}&id=p2pContactChat`;
}
function airtelBankTransferLink() {