Skip to content

Instantly share code, notes, and snippets.

@ehongyu
Last active March 2, 2017 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehongyu/0b494d44e613e15327132d90ae09df47 to your computer and use it in GitHub Desktop.
Save ehongyu/0b494d44e613e15327132d90ae09df47 to your computer and use it in GitHub Desktop.
<?php
// put your autoloader path here
\Stripe\Stripe::setApiKey('secret'); // put your secret key here
$account = \Stripe\Account::create([
'managed' => true,
'email' => 'test@tradesy.com'
]);
// populate the missing verification fields
$account->legal_entity->dob->day = '11';
$account->legal_entity->dob->month = '11';
$account->legal_entity->dob->year = '1911';
$account->legal_entity->first_name = 'test';
$account->legal_entity->last_name = 'tradesy';
$account->legal_entity->type = "individual";
$account->legal_entity->address = [
'city' => $this->city,
'country' => 'US',
'line1' => '2nd st',
'postal_code' => '90401',
'state' => 'CA'
];
$account->legal_entity->ssn_last_4 = "1111"; // you can remove this line and run again to see difference
$account->tos_acceptance->ip = "127.0.0.1";
$account->tos_acceptance->date = time();
$response = $account->save();
$account = \Stripe\Account::retrieve($account->id);
var_dump($account->verification->fields_needed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment