digikraaft / zeeh-php
PHP Implementation of Zeeh API
Requires
- php: ^8.1 | ^8.2
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.4
- phpunit/phpunit: ^10.3
README
This package provides an expressive and convenient way to interact with the Zeeh API.
Installation
You can install the package via composer:
composer require digikraaft/zeeh-php
Usage
All APIs documented in Zeeh's API Reference are currently supported by this package.
Authentication
Before using any of the available methods, ensure to set the public and private keys of your app. You can get this from the Zeeh's dashboard.
<?php
include_once('vendor/autoload.php');
use Digikraaft\Zeeh\Zeeh;
Zeeh::setPrivateKey('privk_1234abcd');
Zeeh::setPublicKey('pubk_1234abcd');
Available Methods
A list of the available methods are documented below:
Account
all() : Array|Object
- Gets all accounts available for a particular institutionauthorize(string $accountId) : Array|Object
- Authorize a Customer for transactionsdetails(string $accountId) : Array|Object
- Gets a particular account in a financial institutionidentity(string $accountId) : Array|Object
- Obtains customer detailssync(string $accountId) : Array|Object
- Make a request for a data sync operation
Bvn
advancedLookUp(string $bvn) : Array|Object
- Generates user data from BVNsimpleLookUp(string $bvn) : Array|Object
- Generates user data from BVNverifySelfie(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)simpleLookUp(string $rcNumber) : Array|Object
- Fetch and verify SMEs, corporate organizations and individuals using Corporate Affairs Commission (CAC)
DriverLicense
lookUp(string $licenseNumber) : Array|Object
- Lookup and verify Driving License
Nin
lookUp(string $nin) : Array|Object
- Fetch and verify customers details using National Identification Number NINverifySelfie(string, $nin, string $base64ImageString) : Array|Object
- Perform selfie verification using NIN
Nuban
lookUp(string $bankAccountNumber) : Array|Object
- Generate user data from the Nuban
Passport
lookUp(string $passportNumber, string $lastName, string $firstName, string $dateOfBirth) : Array|Object
- Verify an international passport
PhoneNumber
advancedLookUp(string $phoneNumber) : Array|Object
- Get advanced details of a phone numbersimpleLookUp(string $phoneNumber) : Array|Object
- Get details of a phone number
Tin
lookUp(string $taxIdentificationNumber) : Array|Object
- Verify Tax Identification Number
Transaction
list(string $accountId) : Array|Object
- Fetch transactions connected to an accountfetchStatement(string $accountId, int $period) : Array|Object
- Fetch transactions connected to an account filtered by period
Vin
lookUp(string $vin, string $state, string $lastName) : Array|Object
- Verify Voter's Identification Number
Zeeh
getPrivateKey(): string
getPublicKey() : string
setPrivateKey(string $privateKey)
- Set your Zeeh Private KeysetPublicKey(string $publicKey)
- Set your Zeeh Public KeywalletBalance() : Array|Object
- Fetch current balance in your Zeeh wallet
This package returns the exact response from the Zeeh's API but as the stdClass
type.
Testing
composer test
More Good Stuff
Check here for more awesome free stuff!
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Contributions are welcome! Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email hello@digikraaft.ng instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.