please help me how to set or render success url to my ionic app. when i integrating PayU money to Ionic app it requires Success Url and Failure Url after completion of payment it render into success url but it's not back to Ionic App.
<form name="sendParam" method="post" action="https://test.payu.in/_payment.php">
<input type="text" name="key" value="P3kHif" />
<input type="text" name="txnid" value="mdd0123" />
<input type="text" name="amount" value="100" />
<input type="text" name="productinfo" value="oxygenconcentrator" />
<input type="text" name="firstname" value="test" />
<input type="text" name="email" value="test@gmail.com" />
<input type="text" name="phone" value="9999999999" />
<input type="text" name="surl" value="http://example.com" />
<input type="text" name="Furl" value="http://example.com/about-us/" />
<input type="text" name="Hash" value="9a4c95b065ae294414e6a5b0b6e8e5d1a2ebf26074228eac6ff7c7d739c9cd4d021a9f70af8860ac369b1ccecfdaa60ba5839ee9dc1fd41e2848a3813677d520"/>
<input type="submit" value="enter"/>
</form >
and response comes from PayUmoney is only in HTML format it doesn't have any JSON Object format. Just i followed the following Link PayU Money Rest API
Payumoney does't have sdk for Hybrid applications. We need to use Cordova inapp browser to achieve this.
Step 1 : Create Payumoney Account and get sandbox details.
Step 2: Install Cordova inapp browser
Step 3: Create your payment url
Step 4 : Create success and failure url in server and add these urls in your payment page
Step 5: Run your payment url in your inapp browser.
Thats it. It will do a payment process and send a status to given success and failure url.
Here you can find a code for payment gateway integration in ionic.
I have being searching for the same but no luck. So end up doing lot of workaround to get it working with my IONIC 1 App.
My approach might not be perfect but I am able to get working payment for my ionic app.
First I thought of sharing my app with you guyz but there are few credentials I am packing with it so is not safe to share it here. yes my app is live in playstore and have more than 100 active users (last time i checked)
Any ways let me show you how I did it in my app. Below is my code. Please see if anyone has a better approach please share.. ` $scope.pay = function (address) {
rest of the code is self explanatory.
Hope this will help.
here is my payumoney templet`
`