Skip to content
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

Paypal not opened on Android when package name has uppercase characters #56

Open
dvcroft opened this issue Apr 19, 2018 · 2 comments
Open

Comments

@dvcroft
Copy link

dvcroft commented Apr 19, 2018

When I choose PayPal as a payment option, the payment UI disappears and I get an error, "Result was not RESULT_CANCELED, but no PaymentMethodNonce was returned from the Braintree SDK"

Fortunately I've identified the cause and a hack to verify the solution, but I don't know enough about plugins to contribute a fix.

My application bundle id has upper and lower case characters. From the braintree docs, the android xml must include com.your-company.your-app.braintree with no underscore and in all lowercase. see https://developers.braintreepayments.com/guides/client-sdk/setup/android/v2#browser-switch-setup

I edited the following files:
platforms/android/android.json
plugins/cordova-plugin-braintree/plugin.xml

and replaced the ${applicationId}.braintree with [my bundle name hardcoded in lowercase].braintree

I then manually deleted the original activity with the applicationId from platforms/android/AndroidManifest.xml

When I rebuild, the hardcoded entry is added to AnrdoidManifest.xml, and when run I get the paypal screen as expected.

I haven't tried this on IOS yet, but suspect I may have a similar problem there.

Thanks for creating and maintaining this plugin!

@codinronan
Copy link

Wow that's... that's amazing. Just ran into this. Thanks!

@sumitkumar991
Copy link

Ran into the same issue, then changed the package name to all small letters and it started working. Many thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants