braintree / braintree-web-drop-in

Braintree Drop-in for the web
MIT License
200 stars 126 forks source link

'No value passed to payment' error when using Paypal checkout flow 'vault' #814

Closed r0oto0r closed 2 years ago

r0oto0r commented 2 years ago

Hey everyone,

I'm trying to migrate from Paypal SDK v1 to braintree and I'm having issues using the Paypal checkout flow type 'vault'. The Paypal sandbox account is linked to the braintree sandbox account and everything seems to be setup correctly (afaik). I've started using the drop-in client to test my backend integration, but whenever I try to use the checkout flow 'vault' I'm getting this error:

No value passed to payment

If I change the flow to 'checkout', add an amount and everything else needed, it works just fine. My implementation of the test drop-in looks like:

braintree.create({
        authorization: 'auth_token',
        paypal: {
            flow: 'vault'
        },
        container: '#dropin-container'
    }, (error, dropin) => {
        if(error) {
            console.error(error);
    }
});

Not sure what I'm doing wrong. Any ideas?

Thanks, Ben

r0oto0r commented 2 years ago

Update:

I have created a new Paypal Dev account, but instead of using the credentials of the sandbox business account I've used an OAuth App as described here (https://developer.paypal.com/braintree/docs/guides/paypal/testing-go-live#linked-paypal-testing). I think that fixed my issue. Not sure if it's the new account or using the app tho.

hollabaq86 commented 2 years ago

Glad to hear you resolved your issue, should you need assistance troubleshooting please contact Support.