问题描述
无论何时,我通过Braintree API或他们的沙盒创建交易时,交易都会经历许多状态,例如已授权,已提交和解,已结算...,这大约需要24小时。我想问一下有没有一种方法可以在沙箱/ api中创建交易,并且可以立即解决或提出争议。我不知道为什么要花这么多时间...在网上购物时,我的信用卡会立即收费。
Whenever, I create a transaction via Braintree API, or via their sandbox, it goes through many statuses like Authorized, Submitted for Settlement, Settled ... and all this takes 24 hours approximately. I want to ask is there a way by which I can create a transaction in sandbox/api and it is settled or disputed instantly. I don't know why it takes so much time ... e.g. in online shopping my credit card is charged immediately. How can same be achieved via braintree payments sandbox ?
推荐答案
每个客户端库都有一种方法可以立即在沙盒中结算交易。对于:
Each client library has a method to instantly settle a transaction in Sandbox. For PHP, it's in the TestHelper:
class Braintree_TestHelper
{
. . .
public static function settle($transactionId)
{
$http = new Braintree_Http(Braintree_Configuration::$global);
$path = Braintree_Configuration::$global->merchantPath() . '/transactions/' . $transactionId . '/settle';
$http->put($path);
}
. . .
}
在生产中,您运行的任何交易通常都会显示为费用即时刷卡,但不是永久的,在交易完成之前,这笔钱实际上不会动用。换句话说,即使结算可能需要24小时,但收费不会花那么长时间才能显示在卡上。
In production, any transaction that you run will generally show up as a charge on a credit card instantly, but it isn't "permanent" and the money won't actually move until the transaction has settled. In other words, even though settlement can take 24 hours, the charge doesn't take that long to show up on the card.
这篇关于Braintree-为什么通过API或沙箱创建的Braintree交易需要花费大量时间才能结算?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!