ionic framework use angularjs, I have some questions about payment. I searched about paypal and found some plugins.
But about local services in each country that just provide for only
php. Also we can relate our angular app with php by
$http service. (By posting information)
Main question : What would be our
callback url (we should pass as argument) after payment? (Because it’s not brower for full url)
Any idea for implementing it? Thanks.
it would a little bit hacky i implemented that in a magento app:
you need a backend to use the payment service, that needs php or Node or any other backend language.
There you can configure endpoints for your payment, e.g. for Paypal a successCallback, a cancel or errorCallback.
You need to implement this endpoints/callbacks in you backend.
In the app:
you can open a new browser-window with the payment url to start the checkout
After something goes wrong, the payment calls your cancel or error callback or in the success case the success callback geets called.
Your app can listen when ever the address of the new window changed --> so you can check on what page you are. If you are on the success/error url --> close the window and show error message or success message.
But i know this is crappy… but i know only paypal has a crodova plugin right now to provide a better user experience:
@bengtler Thank you so much. How about
iframe tag? Can we handle payment by loading it into iframe? Or maybe a bit complicated, using inAppBrowser plugin?
iframe is not a good idea, because you would break the security intention.
Like Payments working on a https you would load that “safe” content in an unsafe environment (your app).
So it is better to let the users know “hey now you are on the ordinary paypal site” instead of showing in a ugly way the payment-website as iframe (maybe the payment provider blocks including the page as iframe).
But i know some creditcard providers are using iframes to get the card information.
There are many other payment options like payone where you have a multipayment provider. But i do not have experiences with that, because in most cases my customers do not want to pay for each transaction… so i need free alternatives. So i mostly have to use the api i get from the payment provider.
Makes sense. Stripe is neat since there aren’t any monthly fees and they’re easy to manage, and all the API’s are free. They even have a customer api so that if someone uses their card once, stripe gives you a token for the card so you can save that in the users account since it’s not the original credit card number, and then if they want to pay with that same card you just verify the card with stripe, then send the payment through. It’s a really cool API
And they take bitcoin hahahaha.
lolz bitcoins… maybe you can ask them to accept paysafe cards
+1 to stripe, it’s my go-to platform for taking payments, unlike paypal they actually make it easy for developers to use their product. Then again it’s not in every country…
Yes, exactly my problem. In my country I can’t use paypal or other providers. I must use native providers that just have api for
asp etc. Thanks all of you.
@jawache @bengtler @nnnnnorthhhhh
But is the PayPal button does not work on Cordova based app like ionic on mobile devices? I integrate Braintree in my Ionic app as well but I can not use PayPal - the button just won’t works and their supports said the same thing. They said the mobile payment is only support native iOs and Android but not hybrid app… which make me really mad…Come on, hybrid app gonna domain the world… but no mobile payment apparently!