javascript - BrainTree 91560 Transaction could not be held in escrow ← (JavaScript)

I am having an error I am not sure how to solve with BrainTree. All data has been changed this is only example The nonce 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 is what is happening. The payment process and the status is 'submitted_for_settlement', which is different from what the docs have said. Now here is where it gets weird.

$result->transaction->escrowStatus

The escrowStatus is always empty, doesn't work

$result->transaction->serviceFeeAmount

Service fee amount prints out, so that works.

And then when I try to hold the transaction in escrow

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

It throws the error 91560 Transaction could not be held in escrow. Any idea of why this is panneing?

Answer



Solution:

If you are using master merchant account id then you can not escrow held payment.

Source