braintree / braintree-web

A suite of tools for integrating Braintree in the browser
https://developer.paypal.com/braintree/docs/start/hello-client/javascript/v3
MIT License
444 stars 134 forks source link

Support PayPal Tokens Per Funding Instrument #731

Closed cameronbjork-tbg closed 2 weeks ago

cameronbjork-tbg commented 2 weeks ago

General information

Issue description

The application I am maintaining uses Braintree tokens to create a new transaction on the server side after a customer has vaulted. When using Braintree with PayPal, there is no way to store a token for the various funding instruments within a PayPal wallet in the standard checkout flow. After vaulting 1 account, the customer has the option to choose a different funding source; however, when passing storeInVaultOnSuccess(true) on the server with a nonce for one of the funding instruments selected on the client, it will not store this to the vault.

I have been in communication with various Braintree engineers, and they said currently when a user vaults a PayPal account, the initial funding instrument they select will be tied to that token. If they go to checkout again and chose a different funding instrument, this will not create a new token and instead be tied only to the transaction via the nonce. This does not seem consistent with how BT handles credit cards, which we have no issues with. This would be like saying you have 1 vaulted token for Visa, and all other Visa cards you add will only be tied to the transaction.