克ryptonpay / nfse-bh-sdk-new
贝洛奥里藏特NFS-E生成库
0.0.2
2023-06-29 13:25 UTC
Requires
- php: >=7.0
- league/flysystem: >=1.0
- mpdf/mpdf: ^8.1
- nesbot/carbon: ^2.28
- symfony/property-access: ^6.2
- symfony/serializer: ^6.2
Requires (Dev)
- phpunit/phpunit: ^7
- symfony/var-dumper: ^5.0
This package is not auto-updated.
Last update: 2024-09-19 19:16:22 UTC
README
通过贝洛奥里藏特市政府的webservice进行服务发票的发行、查询和取消的API - MG
预 requisitos
您需要什么来安装软件以及如何安装
最小 PHP 7.2
安装
使用composer进行下载
composer require yaguin/nfse-bh-sdk
开始使用
- 按照以下步骤正确使用库
1 - 将您的数字证书 .PFX 添加到以下目录
storage/certificates/{{56142462000106}}/certificate.pfx
"56142462000106" 是公司的CNPJ。
2 - 每次使用任何实现过的ENDPOINT时,总是传递配置参数。
tests/systemSettings
use Exception; use NFse\Config\Boot; use NFse\Helpers\Utils; use NFse\Models\Settings; try { //ambiente $settings = new Settings(); $settings->environment = 'homologacao'; //Emitente $settings->issuer->name = 'LINK SERVICOS DE CERTIFICACAO DIGITAL LTDA'; $settings->issuer->cnpj = 11508222000136; $settings->issuer->imun = 2530360019; $settings->issuer->codMun = 3106200; //certificado digital $settings->certificate->folder = __DIR__ . '/../storage/certificates/' . $settings->issuer->cnpj . '/'; $settings->certificate->certFile = 'certificate.pfx'; $settings->certificate->mixedKey = 'mixedKey.pem'; $settings->certificate->privateKey = 'privateKey.pem'; $settings->certificate->publicKey = 'publicKey.pem'; $settings->certificate->password = '215424958751'; $settings->certificate->noValidate = true; //dev if ($settings->environment == 'homologacao') { Utils::xdebugMode(); } //efetua o boot no lib $system = new Boot($settings); $system->init(); } catch (Exception $e) { throw $e; }
执行测试
遵循 "tests" 文件夹内的测试案例
作者
- Yago Fernandes - Linkedin
贡献者
- Wander Alves - Linkedin
许可
本项目采用MIT许可 - 请参阅[LICENSE.md] (LICENSE.md) 文件以获取详细信息
感谢
- Krypton Tech 对我提供时间和资源以实现此库的支持。