superfaktura / eet
EET (捷克财政部销售电子记录) PHP 客户端,基于 ondrejnov/eet
dev-master
2020-12-09 09:09 UTC
Requires
- php: >=5.6.0
- ext-curl: *
- ext-mbstring: *
- ext-openssl: *
- ext-soap: *
- robrichards/wse-php: 2.0.*
- robrichards/xmlseclibs: ^3.1
Requires (Dev)
- phpunit/phpunit: >=5.7.5
Suggests
- ramsey/uuid: Useful tool for generating UUIDv4
This package is not auto-updated.
Last update: 2024-09-17 06:31:18 UTC
README
安装
使用 Composer 安装 superfaktura/eet
$ composer require superfaktura/eet
依赖
- PHP >=5.6
- robrichards/wse-php
- robrichards/xmlseclibs
- PHP 扩展: php_openssl, php_soap, php_curl, php_mbstring
示例用法
示例代码位于 examples/ 文件夹中
use Po1nt\EET\Dispatcher; use Po1nt\EET\FileCertificate; use Po1nt\EET\Receipt; $certificate = new FileCertificate(DIR_CERT . '/EET_CA1_Playground-CZ1212121218.p12', 'eet'); $dispatcher = new Dispatcher(PLAYGROUND_WSDL, $certificate); $r = new Receipt(); $r->uuid_zpravy = 'b3a09b52-7c87-4014-a496-4c7a53cf9120'; $r->dic_popl = 'CZ1212121218'; $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
许可协议
MIT