mrgenis / sat-certificadosello
此包最新版本(v1.0.1)没有可用的许可证信息。
用于管理SAT签发的CER和KEY文件并生成CFDI的SELLO和CERTIFICADO的类组
v1.0.1
2017-12-12 00:13 UTC
Requires
- php: >=7.0
- ext-dom: *
- ext-xmlreader: *
- ext-xmlwriter: *
- lib-libxml: >=2.6.20
- mrgenis/sat-cadenaoriginal: 1.0
Requires (Dev)
- phpunit/phpunit: 4.1.3
This package is not auto-updated.
Last update: 2024-09-29 05:34:54 UTC
README
用于处理SAT的CER和KEY文件并生成CFDI签章的类
安装
您可以通过composer安装此包。
composer require mrgenis/sat-certificadosello
使用
验证CER和KEY
将生成CER和KEY的PEM文件以及PFX文件
/// Dirección del archivo CER $cer = $this->path('testing_pm.cer'); /// Dirección del archivo KEY $key = $this->path('testing_pm.key'); /// Contraseña del KEY /// (solo se require la primera vez para generar los PEM) $pas = '12345678a'; $storage = StorageCerKey::create($cer, $key, $pas); /// Se valida que el CER y KEY sean pareja. $storage->matchCerKey();
认证CFDI
将NoCertificado、Certificado和Sello注入CFDI 3.3中。在第一次验证CER和KEY文件(存在PEM文件)之后。
/// Dirección del archivo CER $cer = $this->path('testing_pm.cer'); /// Dirección del archivo KEY $key = $this->path('testing_pm.key'); $storage = StorageCerKey::create($cer, $key); $cerSello = new CertificadoSello33($storage); /// Se obtiene la cedena (string) del xml con NoCertificado, Certificado y Sello. $xml = $cerSello->injectInformation($xml);
许可证
MIT许可证(MIT)。查看许可证文件以获取更多信息。