PHP code example of raditzfarhan / innov8tif-ekyc

1. Go to this page and download the library: Download raditzfarhan/innov8tif-ekyc 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/ */

    

raditzfarhan / innov8tif-ekyc example snippets


use RaditzFarhan\Innov8tifEkyc\OkeyDoc\PH\Client;
use RaditzFarhan\Innov8tifEkyc\Exceptions\APIError;

...

$client = new Client($apiKey);

$caseNo = 'CASE 1234';
$idImageBase64Image = '/9j/4AAQSkZJ...fYs1wRtQHt//Z\r\n';

try {
    $response = $client->drivingLicense($idImageBase64Image, $caseNo);
    
    // success, do something with $response
} catch (APIError $e) {
    // Catch API Error
    // $e->getStatus()
    // $e->getMessage()
    // $e->getMessageCode()
    // $e->getMetaData()
    // $e->getResponseData() // raw response
    throw $e;
} catch (\Throwable $th) {
    throw $th;
}

use RaditzFarhan\Innov8tifEkyc\OkeyID\Client;
use RaditzFarhan\Innov8tifEkyc\Exceptions\APIError;

...

$client = new Client($apiKey);

$base64ImageString = '/9j/4AAQSkZJ...fYs1wRtQHt//Z\r\n';

try {
    $response = $client->ocr($base64ImageString);
    
    // success, do something with $response
} catch (APIError $e) {
    // Catch API Error
    // $e->getStatus()
    // $e->getMessage()
    // $e->getResponseData() // raw response
    throw $e;
} catch (\Throwable $th) {
    throw $th;
}