将银行帐户添加到客户(平衡付款API)

时间:2013-07-11 10:50:46

标签: python balanced-payments

我正在尝试向客户添加银行帐户。但我得到了以下错误。

Bad Request: 400: Invalid field [card_uri] - "/v1/marketplaces/TEST-MP29J5STPtZVvnjAFndM0N62/bank_accounts/BA7bk9dLT3My3fhAmZejgrKq" does not resolve to card Your request id is .....

银行帐户已成功添加。

Python Code

customer = balanced.Customer().save()
customer.add_card('/v1/marketplaces/TEST-MP29J5STPtZVvnjAFndM0N62/bank_accounts/BA7bk9dLT3My3fhAmZejgrKq')

Javascript init

/balanced.init('/v1/marketplaces/TEST-MP29J5STPtZVvnjAFndM0N62/',{'debug': true});

由于

1 个答案:

答案 0 :(得分:1)

错误消息说:

  

/ v1 / marketplaces / TEST-MP29J5STPtZVvnjAFndM0N62 / bank_accounts / BA7bk9dLT3My3fhAmZejgrKq“无法解析为卡

你正在做:

customer.add_card('/v1/marketplaces/TEST-MP29J5STPtZVvnjAFndM0N62/bank_accounts/BA7bk9dLT3My3fhAmZejgrKq')

你应该这样做:

customer.add_bank_account('/v1/marketplaces/TEST-MP29J5STPtZVvnjAFndM0N62/bank_accounts/BA7bk9dLT3My3fhAmZejgrKq')