Search code examples
javascriptcordovapayment-gatewayinappbrowserpayumoney

Handle the Payumoney response in cordova In App Browser


I have an Hybrid App built with Sencha Touch and Cordova which includes payment gateway integeration. I am Using Payumoney for payment gateway. I am using cordova's In App Browser plugin to make a post request to Payu's rest API and from thereon it controls the flow of payment.

Once the payment is completed Payumoney makes a post request to the URL that was supplied by me while making the initial request and i assume it's from there that i should capture the transactional data and return to my app closing the in app browser.

But the issue is that the url of the file that i am supplying is "paymentSuccess.html" and when payu tries to redirect it to this html page which is under android_asset/www directory then it gives me 403 error that access to this page is forbidden.

And hence i cannot run the javascript on that page that captures the transactional data i need.

Is it due to the fact that the payumoney's page was using https and the url that it is supposed to call is file:// ?

How do i handle the response to successfull payment from the payment gateway ?


Solution

  • I managed to solve it and i have posted my learnings at my blog here, hope it helps someone.