nericode / nativescript-paypal-checkout

Nativescript Plugin for PayPal
Apache License 2.0
3 stars 3 forks source link

Getting empty error on paypalRequest call #1

Closed JuanDeLeon closed 5 years ago

JuanDeLeon commented 5 years ago

Hey, is this still supported by chance? I'm running the example with a real token, but getting an empty error object.

paypalCheckout.paypalRequest(options).then(
    (nonce) => {
        console.log("Token nonce: " + nonce);
    }, (error) => {
        console.log(error);
    }
);

CONSOLE LOG file:///app/bundle.js:906:18: {}

Which platform(s) does your issue occur on?

nericode commented 5 years ago

Have you set up your project like this here https://github.com/jibon57/nativescript-braintree?

JuanDeLeon commented 5 years ago

Ran this on an actual device (development) and now I see the following in console: [BraintreeSDK] CRITICAL PayPal requires a return URL scheme to be configured via [BTAppSwitch setReturnURLScheme:]. This custom URL scheme must also be registered with your app.

I'll take a look at setup steps, I may be missing something in my accounts.

Most likely I missed this https://github.com/jibon57/nativescript-braintree#setup-ios-paypal--venmo

nericode commented 5 years ago

What kind of project are you using (Angular, Vue, Typescript)?

nericode commented 5 years ago

You can have a look at this:   https://github.com/NeriCodec/nativescript-paypal-checkout/blob/6771f8fbf48aa35c09e4dd47ff2728866390f7ff/demo/app/app.ts#L8

JuanDeLeon commented 5 years ago

Cool, I'll take a look. I'm using Vue.

nericode commented 5 years ago

Try to set up your entire project as in the demo

JuanDeLeon commented 5 years ago

Thanks, I’ll post back when I get the chance to keep looking at this.

Do you know by chance if this is available for Mexico? Their documentation is a bit confusing and I wonder if I’m even able to use this integration.

I understand full Braintree is not available here, but the PayPal Express Checkout via Braintree “seems” to be supported. Not sure which one you are actually using here.

nericode commented 5 years ago

You can download the other I have tried to perform tests, but make sure you have your server configured.

I am using this plugin in Mexico, because the plugin is designed to use PayPal Express Checkout via Braintree.

So if there is availability in Mexico.

Puedes descargar la demo he intentar realizar pruebas, pero asegurate de tener configurado tu servidor.

Yo estoy usando este plugin en Mexico, porque el plugin esta disenado para utilizar PayPal Express Checkout via Braintree.

Entonces si hay disponibilidad en Mexico.