payment - Braintree API : How can I tell which payment_method is associated with my nonce?

标签 payment braintree payment-method

背景:

  • 我创建了一个带有名字、姓氏和电子邮件的 Braintree 客户
  • 我在结帐表单中使用 dropin ui,它创建一个 payment_method 和 token 并向我发送一个随机数。目前很好。
  • 在我收取随机数之前,我需要在 payment_method 中添加一个帐单地址...

  • 题:
    如何发现与我的 nonce 相关联的 payment_method?

    编辑添加:
    javascript+PHP底部有一个矛盾的引用页到其他未记录的 [paymentMethodNonce] 参数,该参数使用同样未记录的 [options][verifyCard] 参数。我想我可以针对与用户关联的每个 payment_method token 运行 [paymentMethodNonce] sans [options] 并检查错误......大声笑。

    最佳答案

    我在布伦特里工作。如果您有更多问题,我建议您reach out to our support team .

    当您使用 Drop-In UI 时,它不会自动创建付款方式,只是一个随机数。您将随机数传递回您的服务器和 create a payment method用它:

    $result = Braintree_PaymentMethod::create(array(
        'customerId' => '12345',
        'paymentMethodNonce' => 'nonce-from-the-client'
    ));
    

    如果 nonce 指向该客户已存入的付款方式,您将取回现有的付款方式而不是重复的付款方式。

    然后,您可以更新该付款方式以添加账单地址,然后再使用它来创建交易。

    关于payment - Braintree API : How can I tell which payment_method is associated with my nonce?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30584735/

    相关文章:

    paypal - PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE 为 'ItemNotReceivedEligible,UnauthorizedPaymentEligible'

    c# - WP8 应用程序中的付款

    php - WooCommerce:基于付款方式的订单状态

    php - 根据支付网关选项更改 WooCommerce 结帐上的 "Pay Now"按钮文本

    javascript - 我需要注册一家公司才能在生产中使用 Stripe 或 Paypal(我住在加拿大)吗?

    metadata - 将元数据附加到 Stripe Payment Link

    reactjs - TypeError : braintree. 连接不是函数

    php - 根据 WooCommerce 中的特定付款方式添加费用

    ruby-on-rails - braintree gem 相对于 ActiveMerchant braintree gem 的优势

    android - 移动应用程序中的 Dwolla 支付集成