【问题标题】:Braintree fetch existing payment methodsBraintree 获取现有的付款方式
【发布时间】:2017-08-17 19:30:57
【问题描述】:

有人知道我如何从 Braintree 保险库中获取所有付款方式吗?

使用BTDropInResult.fetch,我可以获取最新的付款方式,但不是全部。见下文:

BTDropInResult.fetch(forAuthorization: clientToken, handler: { (result, error) in
    if (error != nil) {
        let message = error?.localizedDescription
        print (message)
    } else if let result = result {
        print(result) // latest payment method
    } else {
    }
})

【问题讨论】:

    标签: ios swift braintree


    【解决方案1】:

    全面披露:我在 Braintree 工作。如果您还有任何问题,请随时联系 support@braintreepayments.com

    您可以使用fetchPaymentMethodNonces(或fetchPaymentMethodNonces:completion,它有一个附加选项defaultFirst 来控制客户的默认付款方式或他们上次使用的付款方式是返回数组中的第一个)。这两种方法都记录在这里:http://cocoadocs.org/docsets/Braintree/4.7.5/Classes/BTAPIClient.html#//api/name/fetchPaymentMethodNonces

    只有当您在用于实例化 BTAPIClient 对象的客户端令牌中传递了客户 ID 时,这些方法才会返回付款方式。

    【讨论】:

      猜你喜欢
      • 2014-12-29
      • 2016-05-23
      • 2015-07-12
      • 2021-08-26
      • 1970-01-01
      • 2018-05-12
      • 2015-11-22
      • 2015-05-30
      • 2015-09-16
      相关资源
      最近更新 更多