0

如果我已经拥有银行账户令牌(balance.js 返回的 id),我需要做一个 get 来记入账户吗?文档位于:

https://docs.balancedpayments.com/current/api.html?language=php#credit-an-existing-bank-account

说:要贷记现有银行帐户,您只需将金额传递到银行帐户的嵌套贷记端点。credits_uri 是一个方便的 uri,因此您可以简单地发出带有金额的 POST 并创建一个信用。

但是下面给出的例子是先获得银行账户,然后是信用。如何在不先获取的情况下将金额和其他参数发布到 credits_uri?

4

1 回答 1

0

If you don't want to get a GET first, you would need to store the credits_uri of the bank account in question and then POST directly to that. e.g.

$credit = new \Balanced\Credit(array(
  "uri" => "/v1/bank_accounts/BA123123/credits", // the credits_uri from the bank account
  "amount" => 100
))->save();
于 2014-01-04T00:21:42.300 回答