是 Braintree_Customer::create() returns 成功的信用卡对象

Is Braintree_Customer::create() returns credit card object on success

Braintree_Customer::create() returns braintree 中的信用卡对象是否成功?

验证对象失败returns。

我想知道在 Braintree_Customer::create() 成功和失败的情况下访问信用卡对象的最佳做法。

看来您可以在成功的结果对象中访问新创建的客户的付款方式 (Python);

我的客户创建电话:

result = braintree.Customer.create({
    'first_name': 'John',
    'last_name': 'Smith',
    'company': 'Internet',
    'email': 'john@example.com',
    'payment_method_nonce':'fake-valid-nonce'
})

所以

result.customer.payment_methods 

将 return 一个包含索引 0 处新创建的支付方式的数组,这实际上是 Braintree 的 Credit Card Result object,其中包含该信用卡对象的所有适当属性。