Skip to content

Instantly share code, notes, and snippets.

@Nathan-Srivi
Last active August 29, 2015 14:21
Show Gist options
  • Save Nathan-Srivi/7010e94b7e74295550d1 to your computer and use it in GitHub Desktop.
Save Nathan-Srivi/7010e94b7e74295550d1 to your computer and use it in GitHub Desktop.
Braintree create merchant
<?php
require_once 'lib/Braintree.php';
Braintree_Configuration::environment('sandbox');
Braintree_Configuration::merchantId('pgd5mp9hwy86jk52');
Braintree_Configuration::publicKey('r2g6qwtr7n9q8fnm');
Braintree_Configuration::privateKey('7ed14b6e3e256baa9b468eee6eb86146');
$validParams = array(
'individual' => array(
'firstName' => "Joe",
'lastName' => "Bloggs",
'email' => "[email protected]",
'phone' => "555-555-5555",
'address' => array(
'streetAddress' => "123 Credibility St.",
'postalCode' => "60606",
'locality' => "Chicago",
'region' => "IL",
),
'dateOfBirth' => "10/9/1980",
'ssn' => "123-00-1234",
),
'business' => array(
'dbaName' => "Robot City",
'legalName' => "Robot City INC",
'taxId' => "123456789",
),
'funding' => array(
'routingNumber' => "122100024",
'accountNumber' => "43759348798",
'destination' => Braintree_MerchantAccount::FUNDING_DESTINATION_BANK,
'descriptor' => 'Joes Bloggs MI',
),
'tosAccepted' => true,
'masterMerchantAccountId' => "sandbox_master_merchant_account"
);
$result = Braintree_MerchantAccount::create($validParams);
print_r($result->success);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment