Esempio n. 1
0
 public function testRunIdentityCheck()
 {
     $faker = Factory::create();
     $first_name = $faker->firstName;
     $last_name = $faker->lastName;
     $params = array('first_name' => $first_name, 'last_name' => $last_name, 'dob' => $faker->date('Y-m-d'), 'email' => $faker->email, 'country' => 'USA', 'addresses' => array(array('building_number' => $faker->numberBetween(10, 10000), 'street' => $faker->streetName, 'town' => $faker->city, 'postcode' => 12345, 'country' => 'USA', 'state' => $faker->stateAbbr, 'start_date' => $faker->date('Y-m-d'))), 'id_numbers' => array(array('type' => 'ssn', 'value' => '433-54-3937')));
     $client = new RestClient(self::ONFIDO_TOKEN, false);
     $applicant = $client->createApplicant($params);
     $identityCheckReport = $client->runIdentityCheck($applicant->getId());
     $this->assertInstanceOf('Favor\\Onfido\\Report\\IdentityReport', $identityCheckReport);
 }