JavaScript: how to use Braintree paymentMethod nonce bu

别说谁变了你拦得住时间么 提交于 2019-12-11 16:38:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!