Download the PHP package ttbooking/fiscal-registrar without Composer

On this page you can find all versions of the php package ttbooking/fiscal-registrar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fiscal-registrar

1. Overview

This Laravel package intended to make, store and process 54FZ-compatible receipts accepted by the Tax Service of Russian Federation through Fiscal Data Operators (FDO, ru ОФД). For the time being it supports most of the Fiscal Data Format (FDF, ru ФФД) 1.05 tags and ATOL Online service API v4 via supplemented driver.

2. Requirements

3. Installation

Installation process is simple and straightforward as for almost any Laravel package.

You can install Fiscal Registrar package via Composer: composer require ttbooking/fiscal-registrar

Package service provider and facade aliases will be automatically registered in your application if package discovery is configured for your project.

Next, you'll need to publish package configuration file (required) and database migration (optional, if you need to change table name or add columns, etc):

Then, if you've published migration, you'll need to make needed changes to it before proceeding to the next step. In a default Laravel installation, look it up here: {/database/migrations/blahblah_receipts.php}.

Finally, you should apply database migration, which will create table for receipt storage: php artisan migrate

4. Configuration

4.1. Using customizable receipt model

First, if you made changes to the database migration (especially table name) during package installation, this step is mandatory. Otherwise, it is completely optional. Create Eloquent model in your application's Models namespace (or somewhere else), say (App\Models\Receipt), and extend it from the package supplemented default implementation (TTBooking\FiscalRegistrar\Models\Receipt). Final result will look like this:

Note the $table property - it should point to the actual receipt table. Of course, you may customize this model as you wish, just don't break what already works :)

4.2. Configuring options

You will find Fiscal Registrar configuration file (published in the installation step) here: {/config/fiscal-registrar.php}.

Main options are:

Also, there is FR_CONNECTION environment variable, which you may use in your project's .env file to choose default connection.

5. General Usage

The most straightforward way of usage in a client code is dependency injection using TTBooking\FiscalRegistrar\Contracts\FiscalRegistrar interface. This interface has two methods:

public function register(Operation $operation, string $externalId, Receipt $data): string

Register receipt described with Receipt DTO ($data argument) using $operation registration method. You must also provide unique identifier of the receipt in your system using $externalId argument. In the simplest case you may use Str::uuid() helper function to generate this identifier. The return value of this method will be the unique receipt identifier on the provider side.

The Receipt DTO mostly resembles similar structure described in ATOL Online documentation.

public function report(string $id): ?Result

Check out current receipt status using identifier, returned by register method.

6. Storage-agnostic FiscalRegistrar facade

7. Receipt facade w/ fluent interface

8. receipt() helper function

9. Web API counterparts

This package also may work as a microservice via its RESTful API.

10. Available console commands

11. Web UI (separate package, take a look)

12. Extending functionality / Writing drivers


All versions of fiscal-registrar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
endroid/qr-code Version ^5.0
laravel/framework Version ^10.0 || ^11.0
spatie/data-transfer-object Version ^3.5
spatie/laravel-query-builder Version ^5.0 || ^6.0
ttbooking/atol-client Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ttbooking/fiscal-registrar contains the following files

Loading the files please wait ....