update jms
This commit is contained in:
parent
a1d9fe5c0b
commit
dc0a3d217a
34
README.md
34
README.md
@ -1 +1,33 @@
|
|||||||
# atol
|
# API клиент для сервиса фискализации платежей АТОЛ Онлайн
|
||||||
|
|
||||||
|
Пример использования:
|
||||||
|
|
||||||
|
```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';
|
||||||
|
$connection->pass = 'pass';
|
||||||
|
$connection->enabled = true;
|
||||||
|
$connection->group = 'group';
|
||||||
|
|
||||||
|
$config = new \AtolOnlineClient\Configuration();
|
||||||
|
$config->connections = [$connection];
|
||||||
|
|
||||||
|
$api = $this->atol->createApi($client, $connection);
|
||||||
|
//$api->setLogger();
|
||||||
|
//$api->setCache();
|
||||||
|
$request = new \AtolOnlineClient\Request\V4\PaymentReceiptRequest();
|
||||||
|
/// ...
|
||||||
|
/// собираем объект запроса
|
||||||
|
///
|
||||||
|
$paymentReceiptRequest = $atol->serializeOperationRequest($request);
|
||||||
|
|
||||||
|
$response = $atol->getApi()->sell($paymentReceiptRequest);
|
||||||
|
|
||||||
|
if ($response) {
|
||||||
|
$postOperationResponse = $atol->deserializeOperationResponse($response);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"php": ">=7.1",
|
"php": ">=7.1",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"guzzle/guzzle": "~3.7",
|
"guzzle/guzzle": "~3.7",
|
||||||
"jms/serializer": "~0.12 || ~1.12",
|
"jms/serializer": "~0.12 || ~1.4",
|
||||||
"symfony/validator": "2.8.*"
|
"symfony/validator": "2.8.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
Loading…
Reference in New Issue
Block a user