Last active
April 19, 2018 10:17
-
-
Save sagar-synergenie/0777fa3c1995058b510cc46c514fc484 to your computer and use it in GitHub Desktop.
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 | |
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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Account Creation Response:
![screen shot 2018-04-16 at 5 12 59 pm](https://user-images.githubusercontent.com/24772016/38807286-b773205e-4199-11e8-8a9d-f6d1a2a9e0f5.png)