ajandera/eet

EET 的 PHP 客户端

0.1.0 2016-10-04 06:55 UTC

This package is not auto-updated.

Last update: 2024-09-18 19:07:08 UTC


README

Downloads this Month Latest stable

安装

使用 Composer 安装 ajandera/eet

$ composer require ajandera/eet

依赖

  • PHP >=5.6
  • php 扩展: php_openssl.dll, php_soap.dll

包含用于非生产使用(沙盒)的 WSDL、密钥和证书

示例用法

示例代码位于 examples/ 文件夹

use Ajandera\EET\Receipt;
use Ajandera\EET\Strings;
use Ajandera\EET\Sender;

$receipt = new Receipt();
$receipt->uuid_zpravy = Strings::generateUUID();
$receipt->dic_popl = 'CZ78394560012';
$receipt->id_provoz = '567';
$receipt->id_pokl = '2';
$receipt->porad_cis = '1';
$receipt->dat_trzby = new \DateTime();
$receipt->celk_trzba = 100;

$sender = new Sender(
    new Certificates(__DIR__.'/../../examples/certifications/EET_CA1_Playground-CZ00000019.p12', 'eet'),
    true
);

echo $sender->sendReceipt($receipt); // return FIK code if success

许可证

MIT

--

该库用于 CRM/ERP 系统 shopyCRM (shopycrm.org)