BrainTree 91560 transaction cannot be performed in escrow

I have a mistake. I'm not sure how to solve it using BrainTree. All data has been changed, this is just an example. The nonce command is generated from javascript and my process looks like this:

//Set the Configuration
Braintree_Configuration::environment($config['mode']);
                Braintree_Configuration::merchantId($config['merchant_id']);
                Braintree_Configuration::publicKey($config['public_key']);
                Braintree_Configuration::privateKey($config['private_key']);

                $result = Braintree_Transaction::sale(array(
                    'amount' => '3.00',
                    'merchantAccountId' => 'jane_doe_instance_3232',
                    'paymentMethodNonce' => '7w0dw',
                    'options' => array(
                        'submitForSettlement' => true,
                        'holdInEscrow' => true,
                        ),
                    'serviceFeeAmount' => "1.00"
                    )
                );

if($result -> success) {
        print_r($result->transaction->escrowStatus);
            print_r($result->transaction->serviceFeeAmount);
        $transaction = Braintree_Transaction::holdInEscrow($result -> transaction -> id);
}

      

Now here's what's going on. Payment process and status "submit_for_settlement" which is different from what the docs said. Now here's where it gets weird.

$result->transaction->escrowStatus

      

escrowStatus is always empty, not working

$result->transaction->serviceFeeAmount

      

The service charge is printed out, so it works.

And then when I try to escrow the transaction

    $transaction = Braintree_Transaction::holdInEscrow($result -> transaction -> id);

      

It throws an error. 91560 The transaction could not be saved in escrow. Any idea why this is panneing?

+3


source to share





All Articles