Web intent plugin return incorrect/invalid response

Hi

I’m using ionic 3 project to work with upi transactions . I’m getting invalid/Incorrect responses from intent to some specific cases

Following are responses for different cases

  • Transaction failure response when i’m using payee upi id as personal upi id
    {
    “extras”: {
    “Status”: “Success”,
    “isExternalMerchant”: true,
    “txnRef”: “4fb3jYzRgU”,
    “resultCode”: -1,
    “response”: “txnId=YBL82c1c751aa4f46d0add819b99fa34f07&txnRef=4fb3jYzRgU&Status=Success&responseCode=00”,
    “bleTxId”: “T2303031537500901062740”,
    “txnId”: “YBL82c1c751aa4f46d0add819b99fa34f07”,
    “requestCode”: 1,
    “responseCode”: “00”,
    “payeeVPA”: “9****anil@ybl”
    },
    “flags”: 0
    }

  • Transacation success response when i’m using payee upi id as merchant upi id

{
“extras”: {
“Status”: “Success”,
“isExternalMerchant”: true,
“txnRef”: “GjXqnkD0wF”,
“resultCode”: -1,
“response”: “txnId=bOsSmoRBGv&txnRef=GjXqnkD0wF&Status=Success&responseCode=00”,
“bleTxId”: “T2303031544480352840616”,
“txnId”: “bOsSmoRBGv”,
“requestCode”: 1,
“responseCode”: “00”,
“payeeVPA”: “CR****D.ibz@icici”
},
“flags”: 0
}

Both responses looks same and also returns success even for a failure transaction. How can i differentiate a success/failure transaction?

I’m using following code to get response

switch (app) {
case ‘paytm’: pack = ‘net.one97.paytm’; break;
case ‘google’: pack = ‘com.google.android.apps.nbu.paisa.user’; break;
case ‘phonepe’: pack = ‘com.phonepe.app’; break;
}
var url = ‘upi://pay?pa=’ + payeeVPA + ‘&pn=’ + payeeName + ‘&tid=’ + tid + ‘&tr=’ + transactionReference + ‘&tn=’ + transactionNote + ‘&am=’ + payAmount + ‘&cu=’ + currency

url = url.replace(’ ', ‘+’);

const options = {
  action: this.webIntent.ACTION_VIEW,
  url, requestCode: 1,
  package: pack
};

this.webIntent.startActivityForResult(options).then(success => {
  console.log(success);

}, error => {
alert(JSON.stringify(error))
console.log(error);
}).catch((e) => {
alert(JSON.stringify(e))
});

Kindly please help me out of this , I got stuck from last one month from this

Thanks
P V Reddy
pvreddy423@gmail.com


Check the API to see if there’s something to help you. This is not ionic related.

Hi @pvreddy423, I need to implement the same upi functionality in my ionic app. can you please help me on that.

Iam using inAppBrowser - everything works fine but cant able to get the upi succuss/failure response.
can you help me on this.

Thanks in advance
Rajkumar V