From becb2f5d11ee049657339907e68f31b50f7bf202 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Thu, 28 Jun 2018 10:44:21 +0300 Subject: [PATCH] Updated README --- README.md | 26 +++++++++++++++++--------- composer.json | 2 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 871818f..938e85c 100644 --- a/README.md +++ b/README.md @@ -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); diff --git a/composer.json b/composer.json index 0707b80..bd3a5bc 100644 --- a/composer.json +++ b/composer.json @@ -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",