2017 © Pedro Peláez
 

library idnow

IDnow API

image

luciuz/idnow

IDnow API

  • Tuesday, April 24, 2018
  • by luciuz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 674 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 201 % Grown

The README.md

luciuz/idnow

IDnow API for everyone!, (*1)

Examples

Test, (*2)

// init
$idNow = new IdNow(
    'companyid',
    'API-KEY-TOKEN',
    'https://gateway.test.idnow.de',
    'v1',
    'https://go.test.idnow.de'
);

// create the ident
$transactionId = 'rSRS6BcacTIm4hM94NleLM55x5jamuRI';
$params = [
    'birthday' => '1989-09-09',
    'firstname' => 'X-AUTOTEST-HAPPYPATH',
    'lastname' => 'Lastname',
    'gender' => 'MALE',
    'nationality' => 'RU',
    'mobilephone' => '+79123456789',
];
$result = $idNow->create($transactionId, $params);

// init test IdNowApi
$idNowTest = new IdNowApi(
    'companyid',
    'API-KEY-TOKEN',
    'https://api.test.idnow.de',
    'v1',
    ''
);

// start
$result = $idNowTest->do("{$idNowTest->companyId}/identifications/$transactionId/start", []);

// request video chat
$result = $idNowTest->do("{$idNowTest->companyId}/identifications/$transactionId/requestVideoChat", []);

// now we are ready to receive a webhook

Production, (*3)

// init
$idNow = new IdNow(
    'companyid',
    'API-KEY-TOKEN',
    'https://gateway.idnow.de',
    'v1',
    'https://go.idnow.de'
);

// create the ident
$transactionId = 'rSRS6BcacTIm4hM94NleLM55x5jamuRJ'
$params = [
    'birthday' => '1989-09-09',
    'firstname' => 'Firstname',
    'lastname' => 'Lastname',
    'gender' => 'MALE',
    'nationality' => 'RU',
    'mobilephone' => '+79123456789',
];
$result = $idNow->create($transactionId, $params);

// get estimated waiting time 
$estimatedWaitingTime = $idNow->estimatedWaitingTime();

// get ident url
$url = $idNow->getUrl($transactionId);

// open url in the iframe
// [identification processs]
// get result redirect
// now we are ready to receive a webhook

Bonus, (*4)

// download results as ZIP
$result = $idNow->download($href, $dir);

// retrieve results as JSON
$result = $idNow->retrieve($transactionId);

The Versions

24/04 2018

dev-master

9999999-dev

IDnow API

  Sources   Download

MIT

The Requires

 

by Vasilii Arnautov

idnow

24/04 2018

1.0.0

1.0.0.0

IDnow API

  Sources   Download

MIT

The Requires

 

by Vasilii Arnautov

idnow