How to integrate CCAvenue to Ionic app?

2020-02-12 21:54发布

I want to integrate ccavenue to my hybrid app that I am building on Ionic but I am unable to find any example or code or any other thing which can be helpful in this. Plz let me know if you have any information regarding this.

Update: Ccavenue didn't work for me even with the iframe because iframe can only work on the registered domain (ie. www.example.com) and not any other place so I left it and choose the Razorpay Payment gateway because it provides official support for Ionic/Cordova.

Here is the sample app. https://github.com/razorpay/razorpay-cordova-sample-app

3条回答
Viruses.
2楼-- · 2020-02-12 22:10

Suhail,

You may not be able to get it done through iFrames as rightly said by some of the members here.

So you can get around it by having a return url on the server and storing the success/failure message along with other details in temp DB on server, check it from the mobile application from an API and decide whether the payment is done or not.

We have done same with snovel.in application and it works perfectly fine with PayUMoney. Only thing you have to remember is checking constantly from mobile application about success or failure of the payment becomes critical.

I hope that helps.

查看更多
叼着烟拽天下
3楼-- · 2020-02-12 22:20
Evening l夕情丶
4楼-- · 2020-02-12 22:25

Finally I was able to integrate CCavenue on my Ionic app. You have to do the following

  • By default ccavenue blocks all ip addresses from showing payment page except the url by which user has registered.
  • First check what ip address is being used by the app while run through ionic serve , ask the ccavenue support to whitelist that ip and also port 8100 or whatever your app is using.
  • Once you've whitelisted the ip now you have to make sure that inappbrowser plugin is installed in the ionic now you have to submit the payment form to another window by using this method

I hope it will help many.

查看更多
登录 后发表回答