1. Go to this page and download the library: Download glook/pecom-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
glook / pecom-sdk example snippets
use glook\PecomSdk\Client\PecomClientFactory;
use glook\PecomSdk\Exception\PecomApiException;
use glook\PecomSdk\Exception\PecomValidationException;
h) {
echo $branch->getTitle() . PHP_EOL;
}
} catch (PecomValidationException $e) {
// 4xx — невалидные данные запроса
echo 'Validation error: ' . $e->getMessage();
print_r($e->getPayload());
} catch (PecomApiException $e) {
// прочие ошибки API ПЭК
echo 'API error: ' . $e->getMessage();
}