JavaScript:如何使用Braintree支付方式随机数 [英] JavaScript: how to use Braintree paymentMethod nonce bu

查看:82
本文介绍了JavaScript:如何使用Braintree支付方式随机数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Braintree v3进行客户端实施.我正在使用dropin UI.我正在尝试创建新的拱形卡.我有一个与我合作的后端团队提供的api,用于更新付款方式.它在标头中获取用户令牌,如果成功,则响应为付款方式随机数.

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.

我只是不确定如何使用此paymentMethod随机数或在何处实际调用api.

I’m just not sure what to do with this paymentMethod nonce or where to actually call the api.

推荐答案

免责声明:我为Braintree工作.如果您需要更详细的答案,请随时联系 Braintree支持

流程应如下:

  • 服务器生成客户端令牌并将其发送给客户端
  • 客户获取客户付款方式,然后获取 payment_method_nonce 并将其发送到您的服务器
  • 服务器收到随机数
  • 交易是使用随机数创建的
  • 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

Drop-in将显示客户保存的付款方式,并自动将所有新输入的付款方式添加到他们的保险柜记录中

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.

此处是有关如何修改更新的付款方式的文档.

这篇关于JavaScript:如何使用Braintree支付方式随机数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆