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
|
```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);
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user