taocomp/php-sdicoop-server
Composer 安装命令:
composer require taocomp/php-sdicoop-server
包简介
A PHP package for implementing web services required by the Italian Exchange System
README 文档
README
A PHP package for implementing web services required by the Italian Exchange System (aka “SdI”).
(Pacchetto PHP per l’implementazione dei webservices TrasmissioneFatture e RicezioneFatture richiesti dal SdI).
Please refer to
- PHP SdICoop - Client to connect to SdI web services
- PHP E-invoice It for managing italian e-invoice and notice XML formats
See Forum Italia - Fatturazione Elettronica for server configuration, interoperability tests, etc. In particular:
- Apache configuration
- Accreditamento SDICoop: configurazione SSL su Apache - Fatturazione Elettroni…
- Interoperability tests
- Test Interoperabilità Soluzioni - Fatturazione Elettronica - Forum Italia
Quickstart
Web Service “TrasmissioneFatture”
Just include examples/tramissione-fatture.php in your endpoint. For example, if your test endpoint is
https://test.example.com/trasmissione/index.php
put the following code in your index.php:
<?php
require_once('/path/to/php-sdicoop-server/examples/trasmissione-fatture.php');
Web Service “RicezioneFatture”
Just include examples/ricezione-fatture.php in your endpoint. For example, if your test endpoint is
https://test.example.com/ricezione/index.php
put the following code in your index.php:
<?php
require_once('/path/to/php-sdicoop-server/examples/ricezione-fatture.php');
Getting started
Dependencies
- PHP 5.5+
php-soap
Install
Composer
composer require taocomp/php-sdicoop-server
Manually
- Clone/download the repository
require_once('/path/to/php-sdicoop-server/vendor/autoload.php');
Namespaces
Please note namespace is changed (v0.1.1), it is now Taocomp\Einvoicing\SdicoopServer.
So to use e.g. WebService class:
use \Taocomp\Einvoicing\SdicoopServer\WebService;
Setup
Web service “TrasmissioneFatture”
- Copy
examples/TrasmissioneFattureHandler.phpsomewhere in your project and add logic for saving invoices and notices on filesystem and/or database - Copy then content of
examples/trasmissione-fatture.phpin your endpoint file - Modify paths accordingly
For example, if your handler class is:
class MyTrasmissioneFattureHandler
{
//...
}
saved in /path/to/MyTrasmissioneFattureHandler.php, then the code in your endpoint will be:
ini_set("soap.wsdl_cache_enabled", 0);
ini_set('soap.wsdl_cache_ttl', 0);
use \Taocomp\Einvoicing\SdicoopServer\WebService;
try
{
require_once('/path/to/php-sdicoop-server/vendor/autoload.php');
require_once('/path/to/MyTrasmissioneFattureHandler.php');
$wsdl = '/path/to/php-sdicoop-server/assets/wsdl/TrasmissioneFatture_v1.1.wsdl';
$ws = new WebService($wsdl);
$ws->setClass('\MyTrasmissioneFattureHandler');
$ws->handle();
}
catch (\Exception $e)
{
WebService::log($e->getMessage(), LOG_ERR);
}
Web service “RicezioneFatture”
Follow the same instructions as in “TrasmissioneFatture”.
Logs
Both web services write on system log.
For example, when you receive a notice “RicevutaConsegna”:
Dec 14 23:52:32 web Taocomp\Einvoicing\SdicoopServer\WebService: RicevutaConsegna IdentificativoSdI:7045996 NomeFile:ITXXXXXXXXXXX_00001_RC_002.xml
Credits
We want to thank all contributors of Forum Italia - Fatturazione Elettronica who have shared their snippets and any available info.
License
GPLv3.
taocomp/php-sdicoop-server 适用场景与选型建议
taocomp/php-sdicoop-server 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.44k 次下载、GitHub Stars 达 18, 最近一次更新时间为 2018 年 12 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 taocomp/php-sdicoop-server 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 taocomp/php-sdicoop-server 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2018-12-21