Search code examples
androidiphonepayment-gatewaypaymentpayment-processing

How payment gateway redirection works in android?


I have a payment gateway integrated in our website, where user is redirected to our payment gateway with merchant and payment information and after successful/failed transaction user get redirected back to our site.

Now we want to use that payment gateway in our android app. So how can I make sure payment gateway redirection works same as it is works in web browser? We can redirect user to android's browser for payment but how the response can be redirected back to android app but not browser. Is this possible?

we are using tpsl-india.in payment gateway.

If this is not possible, please guide me to other and better alternative way. later on I would be wanted this to be done in iPhone also.


Solution

  • Your best bet is to get the redirection to happen inside a WebView, that way you can listen for a URL change and when the user hits the redirect URL you do whatever you need to do inside your application.

    This should work regardless of the payment processor you're using. This same strategy would work for iPhone via the UIWebView component.