-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: payPal plugin does't work on iOS when Capacitor is used for build #2642
Comments
can you provide a sample app using the plugin? |
App with all dependencies: |
@jcesarmobile I think you can create your own empty template and get the same. We need PayPal so it looks like we will use Cordova instead of Capacitor. Are you going to investigate and fix it? |
I will look into it when I have time. |
@jcesarmobile Hello, did you have a chance to investigate it? Also here you can find errors from Xcode console: |
I've found 3 problems.
With just that, the plugin stops crashing on iOS 11 & 12 and works fine. |
@jcesarmobile Capacitor team you are the best support I've ever experienced! |
Considering that both ionic native paypal and braintree are not in development anymore since years now, what's the best procedure to integrate payments gateways such as paypal in Ionic? thanks for your reply |
@marshall86 I'm also dealing with this topic for quite a time and could not find a plugin that is actively maintained. ionic has also announced "ionic payments", where they will officially support apple pay and google pay. Later also other payment methods (I guess paypal etc.) But i suspect here that this will be an enterprise plugin. |
Thanks for your feedback! yes probably it will be an enterprise plugin, fair enough. How would you integrate a method like Paypal using the javascript library? |
The main difference between the native and web variant is that with the native method you have an native inAppBrowser where you authorize yourself with PayPal. With the web variant this is realized with an iFrame. Both variants returns on success a payment nonce (string), which you use to submit the transaction for settlement in your backend. you can directly follow the documentation of the web sdk (no need for workarounds). In order to be able to pay, three components are always involved: the payment gateway, your backend, and your frontend.
Now there are three (i think) ways to pay:
Here you should additionally note: Overall, the payment process is not very simple, but by reading the documentation, it works quite well. Here is a preview of how the PayPal iFrame looks inside ios: If you're interested in a capacitor braintree plugin, the first step would be to create a proposal at capacitor community: |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Paypal works fine only when using Cordova. But when I used the Capacitor it doesn’t work on iOs. I understand that it is not on the Ionic side. But I just want to inform you that
https://github.com/paypal/PayPal-Cordova-Plugin plugin works correctly only with Cordova.
This guide https://ionicframework.com/docs/native/paypal works only using Cordova. I created empty apps (only with PayPal plugin) using both Cordova and Capacitor and tested it with the latest library versions.
Error body from PayPal pop-up:
Invalid merchant
Payments to this merchant are not allowed (invalid clientId)
Error from console:
PayPal SDK: Request has failed with error: invalid_client - System error (invalid_client). Please try again later. (401) | PayPal Debug-ID: 61c53ad41d07b [mock, PayPal iOS SDK 2.17.0] | Details: ( { “error_description” = “Client Authentication failed”; } ).
The clientId is correct from the correct production environment and works only on Android using Capacitor and on both platforms using Cordova.
The text was updated successfully, but these errors were encountered: