平衡 - 将卡设为默认资金来源

时间:2012-07-18 23:26:24

标签: payment balanced-payments

我有一个买家帐户,里面有几张与之相关的有效卡片。根据{{​​3}} Balanced's,最近添加的卡是默认资金来源。如何在不要求用户重新提交其卡片详细信息以创建新卡的情况下,将另一张现有卡设置为默认资金来源?

1 个答案:

答案 0 :(得分:1)

您目前无法设置备用资金来源,最近添加的卡始终是默认值。要借记或记入特定资金工具(如卡或银行帐户),您必须分别作为参数funding_sourcefunding_destination传递对象的URI:

buyer = balanced.Account.find(uri_of_account)
card = buyer.cards[x]
debit = buyer.debit(amount_in_cents, source_uri=card.uri)

merchant = balanced.Account.find(uri_of_account)
bank_account = merchant.bank_accounts[0]
credit = merchant.credit(amount_in_cents, destination_uri=bank_account.uri)