title: Braintree payments Escrow Funding
body: <p>I am trying to implement escrow funding using braintree in php. I have downloaded library from <a href="https://www.braintreepayments.com/docs/php" rel="nofollow">here</a>. My code is below:-</p>
  
  <pre><code>require_once "../braintree/lib/Braintree.php";
  
  Braintree_Configuration::environment("sandbox");
  Braintree_Configuration::merchantId("was4zgn5x6vt99h");
  Braintree_Configuration::publicKey("ydjrasdwyw9npkvnw4");
  Braintree_Configuration::privateKey("f197ac5a66a1fsad37d3950890b2cbda9");
  
  $result = Braintree_Transaction::sale(
    array(
  'amount' =&gt; "100.00",
  
  'creditCard' =&gt; array(
    'number' =&gt; "4111111111111111",
    'expirationDate' =&gt; "12/2014",
  ),
  'options' =&gt; array(
    'submitForSettlement' =&gt; true,
    'holdInEscrow' =&gt; true,
  )
  
    )
      );
  echo "&lt;pre&gt;";
   print_r("\n  message: " . $result-&gt;message);
  </code></pre>
  
  <p>It is working for direct payment. But It is not working for escrow. Please check my code.</p>
  
  <p>Error is:-</p>
  
  <pre><code>"message: Transaction could not be held in escrow."
  </code></pre>
  
  <p>I have got the code from <a href="https://www.braintreepayments.com/docs/php/transactions/escrow" rel="nofollow">here</a></p>