简体   繁体   中英

Braintree - Why braintree transactions created via API, or via sandbox, take so much time before settled?

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 ... eg in online shopping my credit card is charged immediately. How can same be achieved via braintree payments sandbox ?

I work at Braintree. It looks like we already responded to your support email , but I'll post this here for others who have the same problem.

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);
        }

    . . .
}

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM