Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
/ eet Public archive
forked from ondrejnov/eet

EET Client for PHP

License

Notifications You must be signed in to change notification settings

ThreeSixtyEu/eet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of EET Client in PHP

Downloads this Month Latest stable

Installation

Install ondrejnov/eet using Composer:

$ composer require ondrejnov/eet

Dependencies

  • PHP >=5.6
  • robrichards/wse-php
  • php extensions: php_openssl.dll, php_soap.dll

Attached WSDL, key and certificate are intended for non-production usage (Playground).

Example Usage

Sample codes are located in examples/ folder

use Ondrejnov\EET\Dispatcher;
use Ondrejnov\EET\Receipt;
use Ondrejnov\EET\Utils\UUID;

$dispatcher = new Dispatcher(PLAYGROUND_WSDL, DIR_CERT . '/eet.key', DIR_CERT . '/eet.pem');

$r = new Receipt();
$r->uuid_zpravy = UUID::v4();
$r->dic_popl = 'CZ72080043';
$r->id_provoz = '181';
$r->id_pokl = '1';
$r->porad_cis = '1';
$r->dat_trzby = new \DateTime();
$r->celk_trzba = 1000;

echo $dispatcher->send($r); // FIK code should be returned

License

MIT


Implementace EET klienta v PHP

Instalace

Instalace ondrejnov/eet pomocí Composer:

$ composer require ondrejnov/eet

Závislosti

  • PHP >=5.6
  • robrichards/wse-php
  • php extensions: php_openssl.dll, php_soap.dll

Přiložené WSDL, klíč a certifikát jsou pro neprodukční prostředí (Playground).

Ukázka použití

Ukázky použití naleznete ve složce examples/

use Ondrejnov\EET\Dispatcher;
use Ondrejnov\EET\Receipt;

$dispatcher = new Dispatcher(PLAYGROUND_WSDL, DIR_CERT . '/eet.key', DIR_CERT . '/eet.pem');

$r = new Receipt();
$r->uuid_zpravy = 'b3a09b52-7c87-4014-a496-4c7a53cf9120';
$r->dic_popl = 'CZ72080043';
$r->id_provoz = '181';
$r->id_pokl = '1';
$r->porad_cis = '1';
$r->dat_trzby = new \DateTime();
$r->celk_trzba = 1000;

echo $dispatcher->send($r); // Měl by být vrácen FIK kód

Licence

MIT


Reklama

Komu se nechce do implementace, tak může použít on-line službu EETApp.cz, která má pokročilejší správu účtenek včetně tisku na tiskárnu.

Bitcoin Donate

1LZuWFUHeVMrYvZWinxFjjkZtuq56TECot

Packages

No packages published

Languages

  • PHP 100.0%