Skip to content

Instantly share code, notes, and snippets.

@sagar-synergenie
Last active April 19, 2018 10:17
Show Gist options
  • Save sagar-synergenie/0777fa3c1995058b510cc46c514fc484 to your computer and use it in GitHub Desktop.
Save sagar-synergenie/0777fa3c1995058b510cc46c514fc484 to your computer and use it in GitHub Desktop.
<?php
public function createCustomerAccount()
{
$base64 = base64_encode("username:password"); //I have replaced my username/password which i got from document
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', "https://staging.identitymind.com/im/account/consumer", [
'headers' => ["Content-Type" => "application/json",'Authorization' => "Basic $base64"],
\GuzzleHttp\RequestOptions::JSON => [
'man' => 'JohnDoe',//Account name for the user//Maximum length is 60 characters
'tea' => "johndoe@email.com",//Email address for the user Maximum length is 60 characters
'bfn' => "John",
'bln' => "Doe",
'aflsd' => strtotime(Carbon::now()),//Creattion Date in unix timestamp
'accountCreationTime' => strtotime(Carbon::now())
]
]);
$body = $response->getBody();
$stringBody = (string) $body;
$response = json_decode($stringBody);
var_dump($response);die();
}
@sagar-synergenie
Copy link
Author

sagar-synergenie commented Apr 16, 2018

Account Creation Response:
screen shot 2018-04-16 at 5 12 59 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment