Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate Payment Gateway with IONIC

Don't mark question as duplicate or already asked. If know please answer.

I am trying to integrate payumoney payment gateway in my hybrid app. I went through some tutorials and finally reached to plugin cordovaInAppBrowser and using its events, loadstart, loadstop but not able to send and get parameters.Since last One Week I stucked and so finally posting here. Thanks, in advance

like image 334
Nitin Agarwal Avatar asked Oct 27 '16 06:10

Nitin Agarwal


People also ask

Can you integrate payment gateway?

Most of the merchants accepting online payments opt for a payment gateway integration. A payment gateway is a tool that allows merchants to accept online payments. It acts as a bridge or a link between your(merchant's) website and a payment provider/card network. It authorizes and processes online payments.

Does stripe have PayPal integration?

Does PayPal work with Stripe? No, you cannot integrate Stripe with PayPal. However, you can use both payment gateways on your online store to accept payments separately.


1 Answers

Finally I succeed in integrating the payment gateway in ionic. Its very easy, jsut follow the following steps,

  1. add the cordovaInAppBrowser plugin and Inject the dependency.
  2. make all the fields you get that to send to that Gateway with all validations.
  3. now you needed some 3 files as success.php, failure.php and paymentfile.html.
  4. $cordovaInAppBrowser.open("filename?"+params, '_blank',options)
  5. make note that success and faliure php file are in server and access them through server
  6. get the response in the php file than to controller, based on the response traverse the path and its done.

Most important you need to serialize the data while sending as its should be global and assign it to window object. Also we have to use the cordovaInAppBrowser events loadstop() and all the stuff i had done in this event and later i call the close() function when its done.

Its Done.

like image 87
Nitin Agarwal Avatar answered Sep 28 '22 07:09

Nitin Agarwal