问题
I am using Braintree v3 for a client implementation. I am using the dropin UI. I am trying to create a new vaulted card. I have an api from the backend team I’m working with to update payment method. It takes a user token in the Header and if successful, the response is a payment method nonce.
I’m just not sure what to do with this paymentMethod nonce or where to actually call the api.
回答1:
Disclaimer: I work for Braintree. If you need a more detailed answer, please don't hesitate to reach out to Braintree Support
The flow should be as follows:
- the server generates client token and sends it to the client
- the client obtains customer payment method and then a
payment_method_nonce
and sends it to your server - the server receives the nonce
- a transaction is created using the nonce
The Drop-in will display a customer's saved payment methods and automatically add any newly-entered payment methods to their Vault record if you pass a customer_id when generating a client token.
Here is the documentation on how to vault an updated payment method.
来源:https://stackoverflow.com/questions/53167396/javascript-how-to-use-braintree-paymentmethod-nonce-bu