Taracque / cordova-plugin-braintree

:credit_card: A Cordova plugin for the Braintree mobile payment processing SDK.
MIT License
27 stars 42 forks source link

PayPal Error #36

Closed sharperpixels closed 7 years ago

sharperpixels commented 7 years ago

Hi Taracque,

Thanks for taking over the development of this plugin! I've got it installed and working with Credit Cards and ApplePay, but getting an error when trying to use PayPal. As soon as I tap PayPal as the payment method, nothing happens, and Xcode reports this error:

PayPal OneTouchCoreSDK: callback URL scheme com.xxxx.payments is not found in .plist [BraintreeSDK] CRITICAL PayPal requires [BTAppSwitch setReturnURLScheme:] to be configured to begin with your app's bundle ID (com.xxxx). Currently, it is set to (com.xxxx.payments).

I've checked the info.plist and it looks correct, but I can't figure out why xCode reports this error

Also, when app launches these errors are being reported: -canOpenURL: failed for URL: "com.paypal.ppclient.touch.v1://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" -canOpenURL: failed for URL: "com.paypal.ppclient.touch.v2://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" -canOpenURL: failed for URL: "com.venmo.touch.v2://x-callback-url/vzero/auth" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

App Target OS is iOS 9 (same error with target set to iOS 10) Cordova iOS platform is ios@4.3.1

Any help would be greatly appreciated. Thank you.

John

Taracque commented 7 years ago

Do you have the com.xxx.payments entry in Info/URL Types part of your XCode project? ${PRODUCT_BUNDLE_IDENTIFIER}.payments should be there with Editor role. If it is missing you should set this up manually.

sharperpixels commented 7 years ago

Hi Taracque,

Would the com.xxx.payments entry go into the LSApplicationQueriesSchemes or the URL Types? (see attached)

Thanks,

John

screen shot 2017-07-03 at 5 17 48 pm

sharperpixels commented 7 years ago

Hi Taracque,

I've solved the issue by hardcoding my bundle identifier in the URL Schemes (com.xxxx.payments) Thanks for pointing me in the right direction!

John