Updated README
This commit is contained in:
parent
397fa42b72
commit
becb2f5d11
26
README.md
26
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);
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user