More information about versions is in changelog.
Use QR code or sponsor button where is link on my revolut.
Thank you :)
The best way to install h4kuna/ares is using Composer:
composer require h4kuna/ares
Download information about customer via his IN.
Homepage and official ARES documentation. And json API
Load data by one identification number.
use h4kuna\Ares;
$ares = (new Ares\AresFactory())->create();
try {
$response = $ares->loadBasic('87744473');
/* @var $response Ares\Ares\Core\Data */
var_dump($response);
} catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) {
// log identification number, why is bad? Or make nothing.
} catch (Ares\Exceptions\ServerResponseException $e) {
// no response from server or broken json
}
Load data by many identification numbers. Limit by ARES service is set to 100 items, but library chunk it and check duplicity.
use h4kuna\Ares;
/** @var Ares\Ares $ares */
$numbers = ['one' => '25596641', 'two' => '26713250', 'three' => '27082440', 'four' => '11111111'];
try {
foreach ($ares->loadBasicMulti($numbers) as $name => $r) {
var_dump($name, $r->company);
}
} catch (Ares\Exceptions\ServerResponseException $e) {
// no response from server or broken json
}
use h4kuna\Ares;
/** @var Ares\Ares $ares */
try {
$response = $ares->loadDataBox('87744473');
var_dump($response->ISDS);
} catch (h4kuna\Ares\Exceptions\ServerResponseException $e) {
// catch error
}