Skip to content

Commit

Permalink
added facial verification with BVN
Browse files Browse the repository at this point in the history
  • Loading branch information
timoladoyinbo committed Sep 8, 2023
1 parent 4d55c02 commit a81f09f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ A list of the available methods are documented below:
#### Bvn
* `advancedLookUp(string $bvn) : Array|Object` - Generates user data from BVN
* `simpleLookUp(string $bvn) : Array|Object` - Generates user data from BVN
* `verifySelfie(string, $bvn, string $base64ImageString) : Array|Object` - Perform selfie verification using a valid BVN

#### Cac
* `advancedLookUp(string $rcNumber) : Array|Object` - Fetch and verify SMEs, corporate organizations and individuals using Corporate Affairs Commission (CAC)
Expand Down
17 changes: 17 additions & 0 deletions src/Bvn.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Digikraaft\Zeeh;

use Digikraaft\Zeeh\Exceptions\ApiErrorException;
use Digikraaft\Zeeh\Exceptions\InvalidArgumentException;
use Digikraaft\Zeeh\Exceptions\IsNullException;

Expand Down Expand Up @@ -35,4 +36,20 @@ public static function advancedLookUp(string $bvn) : array|object

return static::staticRequest('GET', $url);
}

/**
* @throws InvalidArgumentException
* @throws ApiErrorException
* @throws IsNullException
* @link https://zeehdocs.zeeh.africa/endpoints/endpoints-desk/kyc/facial-verification#verify-with-bvn
*/
public static function verifySelfie(string $bvn, string $base64SelfieImage) : array|object
{
$url = static::endPointUrl("bvn/live/selfie-verification");

return static::staticRequest('POST', $url, [
'selfieImage' => $base64SelfieImage,
'bvn' => $bvn,
]);
}
}

0 comments on commit a81f09f

Please sign in to comment.