1. Go to this page and download the library: Download luciuz/idnow library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
luciuz / idnow example snippets
// 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
// 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
// download results as ZIP
$result = $idNow->download($href, $dir);
// retrieve results as JSON
$result = $idNow->retrieve($transactionId);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.