1
0
mirror of synced 2024-11-21 20:46:03 +03:00
PHP API client for Atol Online
Go to file
Alexey Chelnakov 51ee4788c1 fix v3
2018-06-20 15:58:00 +03:00
src/AtolOnlineClient fix v3 2018-06-20 15:58:00 +03:00
tests/AtolOnlineClient/Tests клиент для атол онлайн 2018-06-20 11:27:16 +03:00
.gitignore init 2018-06-14 17:14:51 +03:00
composer.json update jms 2018-06-20 15:39:30 +03:00
composer.lock update jms 2018-06-20 15:39:30 +03:00
phpunit.xml.dist клиент для атол онлайн 2018-06-20 11:27:16 +03:00
README.md update jms 2018-06-20 15:35:38 +03:00

API клиент для сервиса фискализации платежей АТОЛ Онлайн

Пример использования:

$atol = new \AtolOnlineClient\AtolOnline();

$client = new \Guzzle\Http\Client();
$connection = new \AtolOnlineClient\Configuration\Connection();
$connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4;
$connection->login = 'login';
$connection->pass = 'pass';
$connection->enabled = true;
$connection->group = 'group';

$config = new \AtolOnlineClient\Configuration();
$config->connections = [$connection];

$api = $this->atol->createApi($client, $connection);
//$api->setLogger();
//$api->setCache();
$request = new \AtolOnlineClient\Request\V4\PaymentReceiptRequest();
/// ...
/// собираем объект запроса
///
$paymentReceiptRequest = $atol->serializeOperationRequest($request);

$response = $atol->getApi()->sell($paymentReceiptRequest);

if ($response) {
    $postOperationResponse = $atol->deserializeOperationResponse($response);
}