Download the PHP package padosoft/laravel-ecr17 without Composer

On this page you can find all versions of the php package padosoft/laravel-ecr17. 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 laravel-ecr17

# ๐Ÿ’ณ laravel-ecr17 **Drive Italian ECR17 / "Protocollo 17" POS terminals (Nexi Group) over TCP โ€” straight from your Laravel app.** **The most complete open-source ECR17 toolkit for PHP & Laravel.** ๐Ÿ“š **Official docs:** [https://doc.laravel-ecr17.padosoft.com](https://doc.laravel-ecr17.padosoft.com) [![Packagist Version](https://img.shields.io/packagist/v/padosoft/laravel-ecr17.svg?style=flat-square)](https://packagist.org/packages/padosoft/laravel-ecr17) [![Tests](https://github.com/padosoft/laravel-ecr17/actions/workflows/tests.yml/badge.svg)](https://github.com/padosoft/laravel-ecr17/actions/workflows/tests.yml) [![License: MIT](https://img.shields.io/packagist/l/padosoft/laravel-ecr17.svg?style=flat-square)](LICENSE) [![PHP](https://img.shields.io/packagist/php-v/padosoft/laravel-ecr17.svg?style=flat-square)](composer.json)

๐Ÿ“ฑ Building for iOS / Android (React Native)? There's a sibling port: padosoft/react-native-ecr17-protocol โ€” the same ECR17 protocol as a React Native / Nitro module. It is the behavioral source of truth; this PHP package mirrors its protocol core and test suite.

๐Ÿฆ€ Using Rust / building a desktop app? There's a sibling port: padosoft/rust-ecr17-protocol โ€” the same ECR17 protocol as a pure-Rust crate + a Tauri desktop control panel.


๐Ÿ“š Table of contents

๐Ÿ’ก What is ECR17?

ECR17 ("Protocollo 17") is the Italian amount-exchange protocol spoken between a cash register (ECR) and a payment terminal (POS) over TCP/IP, supported by Nexi Group terminals. The ECR frames an application message (STX โ€ฆ ETX LRC), the terminal ACK/NAKs it, streams progress and receipt lines, and returns the transaction result. This package implements the full protocol โ€” framing, LRC, the ACK/NAK handshake with retransmission and timeouts, every command builder and response parser โ€” as a clean, framework-free PHP core wrapped in a thin Laravel layer.

โœจ Highlights

โœ… Requirements

๐Ÿ“ฆ Installation

Publish the config (optional):

๐Ÿš€ Quick start

Or build a client explicitly (e.g. with your own transport):

โš™๏ธ Configuration

config/ecr17.php (all keys overridable via .env):

Key Env Default Notes
host ECR17_HOST '' POS terminal IP
port ECR17_PORT 1024 TCP port
terminal_id ECR17_TERMINAL_ID '' 8-char terminal id
cash_register_id ECR17_CASH_REGISTER_ID '' ECR id
lrc_mode ECR17_LRC_MODE std stx \| std \| noext \| stx_noext
auto_reconnect ECR17_AUTO_RECONNECT true reconnect + retry safe ops on drop
connection_timeout_ms ECR17_CONNECTION_TIMEOUT_MS 5000
response_timeout_ms ECR17_RESPONSE_TIMEOUT_MS 60000 cardholder wait
ack_timeout_ms ECR17_ACK_TIMEOUT_MS 2000
retry_count / retry_delay_ms โ€ฆ 3 / 200 retransmissions
receipt_drain_ms ECR17_RECEIPT_DRAIN_MS 0 keep forwarding S lines after the result

๐Ÿงพ Commands

status(), pay(), payExtended(), reverse(), preAuth(), incrementalAuth(), preAuthClosure(), verifyCard(), closeSession(), totals(), sendLastResult(), enableEcrPrinting(), reprint(), vas().

Payments/pre-auth/verify accept an optional TokenizationRequest (U).

๐Ÿ“ก Events

Wire callbacks for real-time updates:

๐Ÿ’ฐ Money safety

A connection can drop after the terminal has charged the card but before the response arrives. Re-sending the request would double-charge. Therefore a financial command is never retried after a drop โ€” only read-only/idempotent commands (status, totals, sendLastResult, enableEcrPrinting) are. To recover a lost result, call sendLastResult() (command G). This invariant lives in Session\RetryPolicy and is locked by its tests.

๐Ÿ”Œ Connection handling

ECR17/Nexi terminals often close the TCP socket between transactions. The client runs a non-destructive liveness probe before each command and reconnects proactively, so a command never starts on a stale, half-open socket (which would otherwise fail and โ€” correctly โ€” refuse a financial retry).

๐Ÿ–ฅ๏ธ Demo debug console

The demo/ directory contains a small Laravel app with a React + Tailwind debug console (AJAX): configure & connect to a POS, run every command, and watch the behind-the-scenes log (on screen + file).

No npm/Vite build is needed โ€” the frontend loads React + Tailwind from a CDN. See demo/README.md for details.

๐Ÿญ Production usage

The demo runs commands synchronously for simplicity. A payment can block up to response_timeout_ms (~60s) while the cardholder interacts โ€” that would tie up a PHP-FPM worker. In production, drive the package from a queued job (Laravel Queue + worker) and poll/push the result, or run it under Octane/Swoole. Never block a web request on a live payment.

๐Ÿงช Testing

๐Ÿ“„ License

MIT ยฉ padosoft


All versions of laravel-ecr17 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^13.0
illuminate/contracts Version ^13.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 padosoft/laravel-ecr17 contains the following files

Loading the files please wait ...