1
0
mirror of synced 2024-11-24 22:16:08 +03:00

Updated README

This commit is contained in:
Ilyas Salikhov 2018-06-28 10:44:21 +03:00
parent 397fa42b72
commit becb2f5d11
2 changed files with 18 additions and 10 deletions

View File

@ -1,11 +1,17 @@
# API клиент для сервиса фискализации платежей АТОЛ Онлайн # API-клиент для АТОЛ.Онлайн
Пример использования: API-клиент на PHP для сервиса онлайн-фискализации платежей АТОЛ.Онлайн.
## Требования
* PHP 7.1 и выше
* PHP extension cURL
## Пример использования
```php ```php
$atol = new \AtolOnlineClient\AtolOnline(); $atol = new \AtolOnlineClient\AtolOnline();
$client = new \Guzzle\Http\Client();
$connection = new \AtolOnlineClient\Configuration\Connection(); $connection = new \AtolOnlineClient\Configuration\Connection();
$connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4; $connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4;
$connection->login = 'login'; $connection->login = 'login';
@ -15,13 +21,15 @@ $connection->group = 'group';
$config = new \AtolOnlineClient\Configuration(); $config = new \AtolOnlineClient\Configuration();
$config->connections = [$connection]; $config->connections = [$connection];
$api = $this->atol->createApi($client, $connection); $client = new \Guzzle\Http\Client();
//$api->setLogger();
//$api->setCache(); $api = $atol->createApi($client, $connection);
// $api->setLogger(...);
// $api->setCache(...);
// собираем объект запроса
$request = new \AtolOnlineClient\Request\V4\PaymentReceiptRequest(); $request = new \AtolOnlineClient\Request\V4\PaymentReceiptRequest();
/// ...
/// собираем объект запроса
///
$paymentReceiptRequest = $atol->serializeOperationRequest($request); $paymentReceiptRequest = $atol->serializeOperationRequest($request);
$response = $atol->getApi()->sell($paymentReceiptRequest); $response = $atol->getApi()->sell($paymentReceiptRequest);

View File

@ -2,7 +2,7 @@
"name": "retailcrm/atol-online-client", "name": "retailcrm/atol-online-client",
"type": "library", "type": "library",
"license": "proprietary", "license": "proprietary",
"description": "Api client for Atol Online", "description": "PHP API client for ATOL Online",
"authors": [ "authors": [
{ {
"name": "retailCRM", "name": "retailCRM",