Ondato API Client for PHP. Used for KYC and Verifid integration with Ondato flows.
- php7.1+
composer require velser/ondato-api-php-client
$guzzleClient = new GuzzleHttp\Client([
'timeout' => 10,
'allow_redirects' => false,
'base_uri' => 'https://ondatourl',
'headers' => [
'Accept' => 'application/json'
]
]);
$kycApiClient = new Velser\OndatoApiClient\KycApiClient($guzzleClient, 'apikey');
$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'
);
- 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;
- add factory for quick client building via DI;
- tests;
- client exceptions remap to specific exceptions;
- 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;
MIT (Can be found in LICENSE file)