velser / ondato-api-php-client
Ondato API Client for PHP
Installs: 5 965
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 4
Open Issues: 0
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- guzzlehttp/psr7: ^1.4@dev
Requires (Dev)
- phpunit/phpunit: ^7.0
README
Ondato API Client for PHP. Used for KYC and Verifid integration with Ondato flows.
Requirements
- php7.1+
Installation
composer require velser/ondato-api-php-client
Usage
Kyc
$guzzleClient = new GuzzleHttp\Client([
'timeout' => 10,
'allow_redirects' => false,
'base_uri' => 'https://ondatourl',
'headers' => [
'Accept' => 'application/json'
]
]);
$kycApiClient = new Velser\OndatoApiClient\KycApiClient($guzzleClient, 'apikey');
Verifid
$guzzleClient = new GuzzleHttp\Client([
'timeout' => 10,
'allow_redirects' => false,
'base_uri' => 'https://ondatourl',
'headers' => [
'Accept' => 'application/json'
]
]);
$kycApiClient = new Velser\OndatoApiClient\VerifidApiClient(
$guzzleClient,
'username',
'password'
);
Notes
- Accept header is mandatory, as it otherwise server will return multipart response when sending multipart request;
- base_uri is root uri of Ondato API without specific path;
TODO
- add factory for quick client building via DI;
- tests;
- client exceptions remap to specific exceptions;
Contribution/Maintaining
- Library is maintainable as it's needed. Any contribution/fixes/improvements are appreciated;
- This library is not related to Ondato itself. It's just an integration. So only this repository related stuff is discussed within this repository;
License
MIT (Can be found in LICENSE file)