cossou / firmar-factura-e
PHP 用于签名 FacturaE XML 的桥梁
dev-master
2017-05-15 15:54 UTC
This package is not auto-updated.
Last update: 2024-09-15 03:24:03 UTC
README
使用证书(.p12
)签名 FacturaE XML。
工作原理
在 XML 文件相同的目录中创建一个带有对应证书的签名 XML 文件 .xsig
。
注意:文件将在 XML 文件的同一目录中创建,并在文件名末尾添加 .xsig
。
安装
使用 composer
$ composer require cossou/firmar-factura-e:dev-master
示例
<?php $firmador = new FirmarFacturaE\Firmador; try { $file = $firmador->firmar('invoice.xml', 'cert.p12', 'password'); } catch (Exception $e) { echo $e->getMessage(); } echo $file; // 'path/to/invoice.xml.xsig' (no content only path)
需求
- Java
- PHP
exec()
函数 - PKCS12 证书和密码
许可
MIT