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
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 port8100
or whatever your app is using. - Once you've whitelisted the ip now you have to make sure that
inappbrowser plugin
is installed in theionic
now you have to submit the payment form to another window by using this method
I hope it will help many.
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.
来源:https://stackoverflow.com/questions/39738996/how-to-integrate-ccavenue-to-ionic-app