Created
February 17, 2016 21:06
-
-
Save rserna2010/f7f2c8047255a991e6e7 to your computer and use it in GitHub Desktop.
PHP Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('vendor/autoload.php'); | |
//require_once("Bootstrap.php"); | |
//\Finix\Bootstrap::init(); | |
require(__DIR__ . '/src/Finix/Settings.php'); | |
Finix\Settings::configure('http://b.papi.staging.finix.io', 'USwyuGJdVcsRTzDeX9smLVGQ', '968cb207-1abb-4100-9425-9a723e99eb10'); | |
require(__DIR__ . '/src/Finix/Bootstrap.php'); | |
\Finix\Bootstrap::init(); | |
use Finix\Resources\Identity; | |
$payload = <<<TAG | |
{ | |
"entity": { | |
"business_type": "LIMITED_LIABILITY_COMPANY", | |
"business_phone": "+1 (408) 756-4497", | |
"first_name": "dwayne", | |
"last_name": "saget", | |
"dob": { | |
"month": 5, | |
"day": 27, | |
"year": 1978 | |
}, | |
"business_address": { | |
"city": "San Mateo", | |
"country": "USA", | |
"region": "CA", | |
"line2": "Apartment 8", | |
"line1": "741 Douglass St", | |
"postal_code": "94114" | |
}, | |
"doing_business_as": "doingBusinessAs", | |
"phone": "1234567890", | |
"personal_address": { | |
"city": "San Mateo", | |
"country": "USA", | |
"region": "CA", | |
"line2": "Apartment 7", | |
"line1": "741 Douglass St", | |
"postal_code": "94114" | |
}, | |
"business_name": "business inc", | |
"business_tax_id": "123456789", | |
"email": "[email protected]", | |
"tax_id": "5779" | |
} | |
} | |
TAG; | |
$identity_info = json_decode($payload, true); | |
$identity = new Identity($identity_info); | |
$identity->save(); | |
var_dump($identity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment