问题描述
我有使用离子内置的Android应用程序,它使用UPI deeplinking制作人对人或人商户汇款。添加相关的代码示例的理解。过去,这工作没有任何问题,直到2020年十月后,它停止了从GooglePay,PayTM,PhonePe,比姆的工作。但是,如果没有与ICICI iMobile任何问题的作品,因为我有账户ICICI。
upi() {
console.log("on UPI Button Click");
if (this.upiId == null) {
this.openToastError("UPI ID is required");
return;
}
if (this.upiName == null) {
this.openToastError("UPI Name is required");
return;
}
if (this.amount == null) {
this.openToastError("Amount is required");
return;
}
if (this.description == null) {
this.description = "Paid through UPI Deeplinking";
}
const tid = this.getRandomString();
const orderId = this.getRandomString();
const totalPrice = this.amount;
const UPI_ID = this.upiId
const UPI_NAME = this.upiName;
const UPI_TXN_NOTE = this.description;
let uri = `upi://pay?pa=${UPI_ID}&pn=${UPI_NAME}&tid=${tid}&am=${totalPrice}&cu=INR&tn=${UPI_TXN_NOTE}&tr=${orderId}`;
uri = uri.replace(' ','+');
(window as any).plugins.intentShim.startActivityForResult(
{
action: this.webIntent.ACTION_VIEW,url: uri,package: 'com.google.android.apps.nbu.paisa.user',requestCode: 1
},intent => {
if (intent.extras.requestCode === 1 &&
intent.extras.resultCode === (window as any).plugins.intentShim.RESULT_OK &&
intent.extras.Status &&
(((intent.extras.Status as string).toLowerCase()) === ('success'))) {
this.paymentSuccess(JSON.stringify(intent),'UPI');
} else {
alert('Unable to process your payment');
}
},err => {
alert('error ' + err);
});
}
async openToastError(msg: string) {
const toast = await this.toastCtrl.create({
message: msg,duration: 1000,position: "top",color: 'danger'
});
toast.present();
}
getRandomString() {
const len = 10;
const arr = '1234567890asdfghjklqwertyuiopzxcvbnmASDFGHJKLQWERTYUIOPZXCVBNM';
let ans = '';
for (let i = len; i > 0; i--) {
ans += arr[Math.floor(Math.random() * arr.length)];
}
return ans;
}
paymentSuccess(orderId: string,paymentMethod: string) {
alert(`Payment successful Order Id ${orderId} payment method ${paymentMethod}`);
}
是任何人都能够成功地解决这个问题呢?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)