Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lamoda/atol-client-bundle
Bundle for ATOL API v3/v4 client for PHP https://github.com/lamoda/atol-client
https://github.com/lamoda/atol-client-bundle
atol bundle fiscalization fz-54 php symfony symfony-bundle symfony3 symfony4
Last synced: 3 months ago
JSON representation
Bundle for ATOL API v3/v4 client for PHP https://github.com/lamoda/atol-client
- Host: GitHub
- URL: https://github.com/lamoda/atol-client-bundle
- Owner: lamoda
- License: mit
- Created: 2018-10-26T11:13:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-04T08:05:51.000Z (over 1 year ago)
- Last Synced: 2024-09-30T16:02:19.265Z (4 months ago)
- Topics: atol, bundle, fiscalization, fz-54, php, symfony, symfony-bundle, symfony3, symfony4
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 7
- Watchers: 21
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ATOL PHP Client bundle
Bundle for https://github.com/lamoda/atol-client[![Build Status](https://travis-ci.org/lamoda/atol-client-bundle.svg?branch=master)](https://travis-ci.org/lamoda/atol-client-bundle)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/lamoda/atol-client-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/lamoda/atol-client-bundle/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/lamoda/atol-client-bundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/lamoda/atol-client-bundle/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/lamoda/atol-client-bundle/badges/build.png?b=master)](https://scrutinizer-ci.com/g/lamoda/atol-client-bundle/build-status/master)## Installation
Usage is as simple as
1. Install library
```bash
composer require lamoda/atol-client-bundle
```2. Register bundle and required JMS Serializer Bundle
```php
// Kernel
public function registerBundles()
{
// ...
$bundles[] = new \Lamoda\AtolClientBundle\AtolClientBundle();
$bundles[] = new \JMS\SerializerBundle\JMSSerializerBundle();
// ...
}
```3. Configure Guzzle client in `services.yaml`, for example:
```yaml
services:
guzzle:
class: \GuzzleHttp\Client
```
4. Configure Symfony to enable `validator` and `enable_annotations`:
```yaml
framework:
validation:
enabled: true
enable_annotations: true
```
6. Add config for any clients you need:
```yaml
atol_client:
clients:
v3: # Version 3 of ATOL API. Currently deprecated and will not be supported by ATOL since 01.01.2019
version: !php/const Lamoda\AtolClientBundle\AtolClientBundle::API_CLIENT_VERSION_3
guzzle_client: guzzle # Link to the service that is guzzle
guzzle_client_options: [] # Options for guzzle client (optional)
base_url: 'http://atol_v3_url' # Base url of ATOL server
callback_url: '' # Callback url for ATOL (see docs)
default:
version: !php/const Lamoda\AtolClientBundle\AtolClientBundle::API_CLIENT_VERSION_4
guzzle_client: guzzle # Link to the service that is guzzle
guzzle_client_options: [] # Options for guzzle client (optional)
base_url: 'http://atol_v4_url' # Base url of ATOL server
```
6. Use `@atol_client.v4` to inject atol client as a dependency