1
0
mirror of synced 2024-11-21 20:46:03 +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
$atol = new \AtolOnlineClient\AtolOnline();
$client = new \Guzzle\Http\Client();
$connection = new \AtolOnlineClient\Configuration\Connection();
$connection->version = \AtolOnlineClient\AtolOnlineApi::API_VERSION_V4;
$connection->login = 'login';
@ -15,13 +21,15 @@ $connection->group = 'group';
$config = new \AtolOnlineClient\Configuration();
$config->connections = [$connection];
$api = $this->atol->createApi($client, $connection);
//$api->setLogger();
//$api->setCache();
$client = new \Guzzle\Http\Client();
$api = $atol->createApi($client, $connection);
// $api->setLogger(...);
// $api->setCache(...);
// собираем объект запроса
$request = new \AtolOnlineClient\Request\V4\PaymentReceiptRequest();
/// ...
/// собираем объект запроса
///
$paymentReceiptRequest = $atol->serializeOperationRequest($request);
$response = $atol->getApi()->sell($paymentReceiptRequest);

View File

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