1
0
mirror of synced 2024-11-21 20:46:03 +03:00
PHP API client for Atol Online
Go to file
2018-06-22 12:38:35 +03:00
src/AtolOnlineClient rename intaro to retailcrm, fix if cond 2018-06-22 11:39:25 +03:00
tests/AtolOnlineClient/Tests немного тестов 2018-06-22 09:21:30 +03:00
.gitignore init 2018-06-14 17:14:51 +03:00
bootstrap.php немного тестов 2018-06-22 09:21:30 +03:00
composer.json rename intaro to retailcrm, fix if cond 2018-06-22 11:39:25 +03:00
composer.lock .lock 2018-06-22 11:42:27 +03:00
LICENSE Added LICENSE 2018-06-22 12:38:35 +03:00
phpunit.xml.dist немного тестов 2018-06-22 09:21:30 +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);
}