├── .gitattributes ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .scrutinizer.yml ├── .vscode ├── launch.json └── settings.json ├── LICENSE.txt ├── Makefile ├── README.md ├── composer.json ├── composer.lock ├── docs ├── Gerar XML da NF-e - Guia de Uso da NFe_Util.url ├── GitHub - Maks3w-xmldsig- PHP Implementation of XML Digital Signature recomendation.url ├── GitHub - robrichards-xmlseclibs- A PHP library for XML Security.url ├── LEGACY.md ├── Manual de integração de olho no imposto.pdf ├── Manual_Integracao_Contribuinte_4.01-NT2009.006.pdf ├── Manual_de_Especificações_Técnicas_do_DANFE_NFC-e_QR_Code - Versão 5.1.pdf ├── Manual_de_especificacoes_tecnicas_da_Contingencia_Off-line_versao_2.0.pdf ├── Painel de Monitoramento de Autorizadores de NFC-e.url ├── Preenchimento_NFC-e_RJ.pdf ├── Tabela Códigos de NCM.url ├── Tabela cStat.txt ├── Validador NF-e TecnoSpeed.url ├── WebServices Oficial.txt ├── XML Editor-Viewer Online - xmlGrid.net.url ├── cacert │ ├── AC-SOLUTI-SSL-EV-G4.crt │ ├── ACPRODEMGERFBG4.crt │ ├── ACREDEIDEIARFB.crt │ ├── ACSecretariadaReceitaFederaldoBrasilv4.crt │ ├── AC_Certisign_G7.crt │ ├── AC_Certisign_Multipla_SSL.crt │ ├── AC_Prodemge_BR.crt │ ├── AC_Prodemge_MG.crt │ ├── AC_Prodemge_MG_v2.crt │ ├── AC_Prodemge_RFB.crt │ ├── AC_Prodemge_SSL.crt │ ├── AC_Prodemge_SSL_v2.crt │ ├── AC_SOLUTI_SSL_EV.crt │ ├── AC_VALID_SSL_EV.crt │ ├── Autoridade_Certificadora_Raiz_Brasileira_v10.crt │ ├── Autoridade_Certificadora_Serpro_v4.crt │ ├── Autoridade_Certificadora_do_Serpro_Final_SSL.crt │ ├── ICP-Brasilv5.crt │ ├── README.md │ ├── ac-digital-v5.crt │ ├── ac-soluti-multipla-v5.crt │ ├── ac-soluti-v5.crt │ ├── acserproacfv5.crt │ ├── append_cert.sh │ ├── cacert.pem │ ├── cacert_mozilla.pem │ ├── hnfce.fazenda.mg.gov.br.crt │ ├── list_dates.sh │ ├── nfce.fazenda.mg.gov.br.crt │ └── update_mozilla_certs.sh ├── certs │ └── certificado.pfx ├── contingencia_offline.png ├── ericmaicon-nfe- Projeto em PHP que contempla a criação do arquivo XML, assinatura, Validação do XSD e Envio para o SEFAZ de NFE (Nota fiscal Eletrônica)-.url ├── exakat-php-static-analysis-tools- A reviewed list of useful PHP static analysis tools.url └── regex.txt ├── examples └── nfce_simples │ ├── Gerador.php │ ├── Processador.php │ ├── README.md │ └── index.php ├── phpstan.neon ├── phpunit.xml ├── src ├── NFe │ ├── Common │ │ ├── Ajuste.php │ │ ├── Certificado.php │ │ ├── Configuracao.php │ │ ├── CurlSoap.php │ │ ├── Evento.php │ │ ├── Node.php │ │ └── Util.php │ ├── Core │ │ ├── NFCe.php │ │ ├── NFe.php │ │ ├── Nota.php │ │ ├── SEFAZ.php │ │ └── schema │ │ │ ├── cancelamento │ │ │ ├── e110111_v1.00.xsd │ │ │ ├── envEventoCancNFe_v1.00.xsd │ │ │ ├── eventoCancNFe_v1.00.xsd │ │ │ ├── leiauteEventoCancNFe_v1.00.xsd │ │ │ ├── procEventoCancNFe_v1.00.xsd │ │ │ ├── retEnvEventoCancNFe_v1.00.xsd │ │ │ ├── tiposBasico_v1.03.xsd │ │ │ ├── version.txt │ │ │ └── xmldsig-core-schema_v1.01.xsd │ │ │ ├── consReciNFe_v4.00.xsd │ │ │ ├── consSitNFe_v4.00.xsd │ │ │ ├── consStatServ_v4.00.xsd │ │ │ ├── enviNFe_v4.00.xsd │ │ │ ├── inutNFe_v4.00.xsd │ │ │ ├── leiauteConsSitNFe_v4.00.xsd │ │ │ ├── leiauteConsStatServ_v4.00.xsd │ │ │ ├── leiauteInutNFe_v4.00.xsd │ │ │ ├── leiauteNFe_v4.00.xsd │ │ │ ├── nfe_v4.00.xsd │ │ │ ├── procInutNFe_v4.00.xsd │ │ │ ├── procNFe_v4.00.xsd │ │ │ ├── retConsReciNFe_v4.00.xsd │ │ │ ├── retConsSitNFe_v4.00.xsd │ │ │ ├── retConsStatServ_v4.00.xsd │ │ │ ├── retEnviNFe_v4.00.xsd │ │ │ ├── retInutNFe_v4.00.xsd │ │ │ ├── tiposBasico_v4.00.xsd │ │ │ ├── version.txt │ │ │ └── xmldsig-core-schema_v1.01.xsd │ ├── Database │ │ ├── Banco.php │ │ ├── Estatico.php │ │ ├── IBPT.php │ │ └── data │ │ │ ├── IBPT │ │ │ ├── .json │ │ │ ├── AC.json │ │ │ ├── AL.json │ │ │ ├── AM.json │ │ │ ├── AP.json │ │ │ ├── BA.json │ │ │ ├── CE.json │ │ │ ├── DF.json │ │ │ ├── ES.json │ │ │ ├── GO.json │ │ │ ├── MA.json │ │ │ ├── MG.json │ │ │ ├── MS.json │ │ │ ├── MT.json │ │ │ ├── PA.json │ │ │ ├── PB.json │ │ │ ├── PE.json │ │ │ ├── PI.json │ │ │ ├── PR.json │ │ │ ├── RJ.json │ │ │ ├── RN.json │ │ │ ├── RO.json │ │ │ ├── RR.json │ │ │ ├── RS.json │ │ │ ├── SC.json │ │ │ ├── SE.json │ │ │ ├── SP.json │ │ │ └── TO.json │ │ │ ├── municipio_ibge_code.json │ │ │ ├── servicos.json │ │ │ └── uf_ibge_code.json │ ├── Entity │ │ ├── Cobranca.php │ │ ├── Destinatario.php │ │ ├── Emitente.php │ │ ├── Endereco.php │ │ ├── Estado.php │ │ ├── Imposto.php │ │ ├── Imposto │ │ │ ├── COFINS │ │ │ │ ├── Aliquota.php │ │ │ │ ├── Generico.php │ │ │ │ ├── Isento.php │ │ │ │ ├── Quantidade.php │ │ │ │ └── ST │ │ │ │ │ ├── Aliquota.php │ │ │ │ │ └── Quantidade.php │ │ │ ├── Fundo │ │ │ │ ├── Base.php │ │ │ │ ├── Retido.php │ │ │ │ └── Substituido.php │ │ │ ├── ICMS │ │ │ │ ├── Base.php │ │ │ │ ├── Cobrado.php │ │ │ │ ├── Cobranca.php │ │ │ │ ├── Diferido.php │ │ │ │ ├── Generico.php │ │ │ │ ├── Integral.php │ │ │ │ ├── Isento.php │ │ │ │ ├── Mista.php │ │ │ │ ├── Normal.php │ │ │ │ ├── Parcial.php │ │ │ │ ├── Partilha.php │ │ │ │ ├── Reducao.php │ │ │ │ ├── Simples │ │ │ │ │ ├── Cobrado.php │ │ │ │ │ ├── Cobranca.php │ │ │ │ │ ├── Generico.php │ │ │ │ │ ├── Isento.php │ │ │ │ │ ├── Normal.php │ │ │ │ │ └── Parcial.php │ │ │ │ └── Substituto.php │ │ │ ├── II.php │ │ │ ├── IPI.php │ │ │ ├── IPI │ │ │ │ ├── Aliquota.php │ │ │ │ ├── Isento.php │ │ │ │ └── Quantidade.php │ │ │ ├── PIS │ │ │ │ ├── Aliquota.php │ │ │ │ ├── Generico.php │ │ │ │ ├── Isento.php │ │ │ │ ├── Quantidade.php │ │ │ │ └── ST │ │ │ │ │ ├── Aliquota.php │ │ │ │ │ └── Quantidade.php │ │ │ └── Total.php │ │ ├── Intermediador.php │ │ ├── Lacre.php │ │ ├── Municipio.php │ │ ├── Pagamento.php │ │ ├── Pais.php │ │ ├── Peso.php │ │ ├── Pessoa.php │ │ ├── Produto.php │ │ ├── Responsavel.php │ │ ├── Total.php │ │ ├── Transporte.php │ │ ├── Transporte │ │ │ ├── Transportador.php │ │ │ ├── Tributo.php │ │ │ └── Veiculo.php │ │ └── Volume.php │ ├── Exception │ │ ├── IncompleteRequestException.php │ │ ├── NetworkException.php │ │ └── ValidationException.php │ ├── Logger │ │ └── Log.php │ └── Task │ │ ├── Autorizacao.php │ │ ├── Envio.php │ │ ├── Evento.php │ │ ├── Inutilizacao.php │ │ ├── Protocolo.php │ │ ├── Recibo.php │ │ ├── Retorno.php │ │ ├── Situacao.php │ │ ├── Status.php │ │ └── Tarefa.php └── util │ ├── AdapterInterface.php │ └── XmlseclibsAdapter.php ├── tests ├── NFe │ ├── Common │ │ ├── CertificadoTest.php │ │ ├── ConfiguracaoTest.php │ │ ├── CurlSoapTest.php │ │ └── UtilTest.php │ ├── Core │ │ ├── NFCeTest.php │ │ ├── NFeTest.php │ │ └── SEFAZTest.php │ ├── Database │ │ ├── BancoTest.php │ │ └── IBPTTest.php │ ├── Entity │ │ ├── DestinatarioTest.php │ │ ├── EmitenteTest.php │ │ ├── EnderecoTest.php │ │ ├── EstadoTest.php │ │ ├── Imposto │ │ │ ├── COFINS │ │ │ │ ├── AliquotaTest.php │ │ │ │ ├── GenericoTest.php │ │ │ │ ├── IsentoTest.php │ │ │ │ ├── QuantidadeTest.php │ │ │ │ └── ST │ │ │ │ │ ├── AliquotaTest.php │ │ │ │ │ └── QuantidadeTest.php │ │ │ ├── ICMS │ │ │ │ ├── CobradoTest.php │ │ │ │ ├── CobrancaTest.php │ │ │ │ ├── DiferidoTest.php │ │ │ │ ├── GenericoTest.php │ │ │ │ ├── IntegralTest.php │ │ │ │ ├── IsentoTest.php │ │ │ │ ├── MistaTest.php │ │ │ │ ├── ParcialTest.php │ │ │ │ ├── PartilhaTest.php │ │ │ │ ├── ReducaoTest.php │ │ │ │ ├── Simples │ │ │ │ │ ├── CobrancaTest.php │ │ │ │ │ ├── GenericoTest.php │ │ │ │ │ ├── IsentoTest.php │ │ │ │ │ ├── NormalTest.php │ │ │ │ │ └── ParcialTest.php │ │ │ │ └── SubstitutoTest.php │ │ │ ├── IITest.php │ │ │ ├── IPI │ │ │ │ ├── AliquotaTest.php │ │ │ │ ├── IsentoTest.php │ │ │ │ └── QuantidadeTest.php │ │ │ ├── PIS │ │ │ │ ├── AliquotaTest.php │ │ │ │ ├── GenericoTest.php │ │ │ │ ├── IsentoTest.php │ │ │ │ ├── QuantidadeTest.php │ │ │ │ └── ST │ │ │ │ │ ├── AliquotaTest.php │ │ │ │ │ └── QuantidadeTest.php │ │ │ └── TotalTest.php │ │ ├── ImpostoTest.php │ │ ├── LacreTest.php │ │ ├── MunicipioTest.php │ │ ├── PagamentoTest.php │ │ ├── PaisTest.php │ │ ├── PesoTest.php │ │ ├── ProdutoTest.php │ │ ├── ResponsavelTest.php │ │ ├── Transporte │ │ │ ├── TransportadorTest.php │ │ │ ├── TributoTest.php │ │ │ └── VeiculoTest.php │ │ ├── TransporteTest.php │ │ └── VolumeTest.php │ ├── Exception │ │ └── ValidationExceptionTest.php │ ├── Logger │ │ └── LogTest.php │ └── Task │ │ ├── AutorizacaoTest.php │ │ ├── EnvioTest.php │ │ ├── EventoTest.php │ │ ├── InutilizacaoTest.php │ │ ├── ReciboTest.php │ │ ├── RetornoTest.php │ │ ├── SituacaoTest.php │ │ ├── StatusTest.php │ │ └── TarefaTest.php └── resources │ ├── certs │ ├── private.pem │ └── public.pem │ └── xml │ ├── destinatario │ ├── testDestinatarioCPFnaNotaXML.xml │ ├── testDestinatarioFisicoXML.xml │ └── testDestinatarioJuridicoXML.xml │ ├── emitente │ └── testEmitenteXML.xml │ ├── endereco │ └── testEnderecoXML.xml │ ├── imposto │ ├── cofins │ │ ├── st │ │ │ ├── testAliquotaXML.xml │ │ │ └── testQuantidadeXML.xml │ │ ├── testAliquotaXML.xml │ │ ├── testGenericoXML.xml │ │ ├── testIsentoXML.xml │ │ └── testQuantidadeXML.xml │ ├── icms │ │ ├── simples │ │ │ ├── testCobrancaXML.xml │ │ │ ├── testGenericoXML.xml │ │ │ ├── testIsentoXML.xml │ │ │ ├── testNormalXML.xml │ │ │ └── testParcialXML.xml │ │ ├── testCobradoFundoXML.xml │ │ ├── testCobradoXML.xml │ │ ├── testCobrancaXML.xml │ │ ├── testDiferidoDiferimentoXML.xml │ │ ├── testDiferidoReducaoXML.xml │ │ ├── testDiferidoXML.xml │ │ ├── testGenericoMargemXML.xml │ │ ├── testGenericoModalidadeXML.xml │ │ ├── testGenericoReducaoXML.xml │ │ ├── testGenericoXML.xml │ │ ├── testIntegralFundoXML.xml │ │ ├── testIntegralXML.xml │ │ ├── testIsentoCondicionalXML.xml │ │ ├── testIsentoNaoTributadoXML.xml │ │ ├── testIsentoSuspensaoXML.xml │ │ ├── testIsentoXML.xml │ │ ├── testMistaXML.xml │ │ ├── testParcialFundoXML.xml │ │ ├── testParcialXML.xml │ │ ├── testPartilhaXML.xml │ │ ├── testReducaoXML.xml │ │ └── testSubstitutoXML.xml │ ├── ipi │ │ ├── testAliquotaXML.xml │ │ ├── testIsentoXML.xml │ │ └── testQuantidadeXML.xml │ ├── pis │ │ ├── st │ │ │ ├── testAliquotaXML.xml │ │ │ └── testQuantidadeXML.xml │ │ ├── testAliquotaXML.xml │ │ ├── testGenericoXML.xml │ │ ├── testIsentoXML.xml │ │ └── testQuantidadeXML.xml │ ├── testIIXML.xml │ └── testTotalXML.xml │ ├── nota │ ├── testIntermediadorNFCeValidadaXML.xml │ ├── testNFCeAssinadaXML.xml │ ├── testNFCeAutorizadoXML.xml │ ├── testNFCeXML.xml │ ├── testNFeXML.xml │ └── testTrocoNFCeValidadaXML.xml │ ├── pagamento │ ├── testPagamentoCartaoNaoIntegradoXML.xml │ ├── testPagamentoCartaoXML.xml │ ├── testPagamentoDinheiroXML.xml │ └── testPagamentoTrocoXML.xml │ ├── produto │ └── testProdutoXML.xml │ ├── responsavel │ ├── testResponsavelInvalidXML.xml │ └── testResponsavelXML.xml │ ├── task │ ├── testAutorizaAutorizadoReponseSOAP.xml │ ├── testAutorizaProcessamentoReponseSOAP.xml │ ├── testAutorizaRejeicaoReponseSOAP.xml │ ├── testAutorizaSOAP.xml │ ├── testEventoRegistrado.xml │ ├── testEventoRegistradoReponseSOAP.xml │ ├── testEventoRejeitadoReponseSOAP.xml │ ├── testEventoSOAP.xml │ ├── testInutilizaInutilizadoProtocolo.xml │ ├── testInutilizaInutilizadoReponseSOAP.xml │ ├── testInutilizaRejeicaoReponseSOAP.xml │ ├── testInutilizaSOAP.xml │ ├── testReciboAutorizadoReponseSOAP.xml │ ├── testReciboProcessamentoReponseSOAP.xml │ ├── testReciboRejeitadoReponseSOAP.xml │ ├── testReciboSOAP.xml │ ├── testSituacaoAutorizadoReponseSOAP.xml │ ├── testSituacaoCanceladoReponseSOAP.xml │ ├── testSituacaoInexistenteReponseSOAP.xml │ └── testSituacaoSOAP.xml │ ├── transportador │ ├── testTransportadorSemEnderecoXML.xml │ └── testTransportadorXML.xml │ ├── transporte │ ├── testTransporteFreteDestinatarioXML.xml │ ├── testTransporteFreteTerceirosXML.xml │ ├── testTransporteNenhumXML.xml │ ├── testTransporteSemModalidadeXML.xml │ ├── testTransporteXML.xml │ ├── testTributoXML.xml │ └── testVeiculoXML.xml │ └── volume │ ├── testVolumeSemPesoXML.xml │ └── testVolumeXML.xml └── utils ├── SQLtoClass.jar ├── atualiza_servicos.bat ├── atualiza_servicos.php ├── atualiza_servicos.sh ├── classes_base.mwb ├── classes_base.sql ├── config.properties ├── copy_paste_detector.bat ├── esboco.json ├── generate_doc.bat ├── mess_detector.bat ├── openssl.exe ├── pfx_to_pem.bat ├── run_phploc.bat ├── template └── api │ └── $[Table.path]$[Table.norm].php ├── update_IBPT.bat ├── update_IBPT.php └── update_IBPT.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Pipeline 2 | on: 3 | push: 4 | branches: 5 | - master 6 | 7 | pull_request: 8 | branches: 9 | - master 10 | 11 | jobs: 12 | testsuite: 13 | name: Testes Automatizados 14 | runs-on: ubuntu-latest 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | php-version: ["8.0", "8.1", "8.2"] 19 | 20 | steps: 21 | - name: Setup PHP 22 | uses: shivammathur/setup-php@v2 23 | with: 24 | php-version: ${{ matrix.php-version }} 25 | extensions: mbstring, intl, curl, zlib, dom, openssl, soap, json, simplexml, libxml 26 | 27 | - name: checkout 28 | uses: actions/checkout@v3 29 | with: 30 | # Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository 31 | # 10 commits is an arbitrary value that is more than 1 commit 32 | fetch-depth: 10 33 | 34 | - name: Composer Install 35 | run: composer install --no-progress -o --no-ansi --no-interaction 36 | 37 | - name: Check php code style 38 | run: composer check-style 39 | 40 | - name: Análises estáticas 41 | run: composer analysis 42 | 43 | - name: Rodando PHPUnit 44 | run: composer test 45 | 46 | - name: Enviando cobertura de código 47 | run: php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | # Network Trash Folder 46 | # Temporary Items 47 | .apdisk 48 | docs/certs/*.pfx 49 | *.sublime-workspace 50 | storage/ 51 | vendor/ 52 | *.mwb.bak 53 | utils/IBPT/*.csv 54 | docs/api/ 55 | docs/logs/*.txt 56 | site/xml/**/*.xml 57 | build/ 58 | utils/IBPT/.svn/ 59 | utils/IBPT/leia-me.txt 60 | .phpunit.result.cache 61 | utils/IBPT 62 | utils/ACBr.zip 63 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Listen for XDebug", 9 | "type": "php", 10 | "request": "launch", 11 | "port": 9000 12 | }, 13 | { 14 | "name": "Launch currently open script", 15 | "type": "php", 16 | "request": "launch", 17 | "program": "${file}", 18 | "cwd": "${fileDirname}", 19 | "port": 9000 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "phpcs.standard": "PSR12", 3 | "[xml]": { 4 | "editor.formatOnSave": false 5 | } 6 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 GrandChef Desenvolvimento de Sistemas LTDA 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Docker Nginx PHP Composer MySQL 2 | 3 | export CURRENT_UID 4 | 5 | CURRENT_UID= $(shell id -u):$(shell id -g) 6 | 7 | help: 8 | @echo "" 9 | @echo "usage: make COMMAND" 10 | @echo "" 11 | @echo "Commands:" 12 | @echo " install Install PHP dependencies with composer" 13 | @echo " update Update PHP dependencies with composer" 14 | @echo " autoload Update PHP autoload files" 15 | @echo " test Run PHPUnit Tests" 16 | @echo " cmd Open terminal with php" 17 | 18 | install: 19 | @docker run --rm \ 20 | -u $(CURRENT_UID) \ 21 | -v $(shell pwd):/app \ 22 | -v /etc/passwd:/etc/passwd:ro \ 23 | -v /etc/group:/etc/group:ro \ 24 | grandchef/composer:2.8.2 install --ignore-platform-reqs --no-scripts --no-interaction 25 | 26 | update: 27 | @docker run --rm \ 28 | -u $(CURRENT_UID) \ 29 | -v $(shell pwd):/app \ 30 | -v /etc/passwd:/etc/passwd:ro \ 31 | -v /etc/group:/etc/group:ro \ 32 | grandchef/composer:2.8.2 update --no-scripts --no-interaction 33 | 34 | autoload: 35 | @docker run --rm \ 36 | -u $(CURRENT_UID) \ 37 | -v $(shell pwd):/app \ 38 | -v /etc/passwd:/etc/passwd:ro \ 39 | -v /etc/group:/etc/group:ro \ 40 | grandchef/composer:2.8.2 dump-autoload --no-scripts --no-interaction 41 | 42 | test: 43 | @docker run --rm -it \ 44 | -u $(CURRENT_UID) \ 45 | -v $(shell pwd):/app \ 46 | -w /app \ 47 | grandchef/php:8.2.2-fpm-dev php ./vendor/bin/phpunit --configuration . --no-coverage --colors=always 48 | 49 | cmd: 50 | @docker run --rm -it \ 51 | -u $(CURRENT_UID) \ 52 | -v $(shell pwd):/app \ 53 | -v /etc/passwd:/etc/passwd:ro \ 54 | -v /etc/group:/etc/group:ro \ 55 | -w /app \ 56 | grandchef/php:8.2.2-fpm-dev /bin/bash 57 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mazinsw/nfe-api", 3 | "type": "library", 4 | "description": "API para geração e envio de notas fiscais eletrônicas brasileiras", 5 | "keywords": ["nfe","nfce"], 6 | "homepage": "https://github.com/mazinsw/nfe-api", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Francimar Alves", 11 | "email": "mazinsw@gmail.com", 12 | "homepage": "https://www.facebook.com/mazinsw", 13 | "role": "Developer" 14 | } 15 | ], 16 | "require": { 17 | "php": ">= 7.3.0", 18 | "ext-curl": "*", 19 | "ext-openssl": "*", 20 | "php-curl-class/php-curl-class": "^9.8", 21 | "robrichards/xmlseclibs": "^3.0", 22 | "monolog/monolog": "^2.3" 23 | }, 24 | "require-dev": { 25 | "phpunit/phpunit": "^9.5", 26 | "scrutinizer/ocular": "^1.6", 27 | "squizlabs/php_codesniffer": "^3.6", 28 | "pdepend/pdepend" : "^2.10", 29 | "phpstan/phpstan": "^1.5", 30 | "phpmd/phpmd" : "^2.12", 31 | "sebastian/phpcpd": "^6.0", 32 | "phploc/phploc": "^7.0" 33 | }, 34 | "autoload": { 35 | "psr-4": { 36 | "NFe\\": "src/NFe" 37 | }, 38 | "classmap": [ 39 | "src/util" 40 | ] 41 | }, 42 | "autoload-dev": { 43 | "psr-4": { 44 | "NFe\\": "tests/NFe" 45 | } 46 | }, 47 | "scripts": { 48 | "test": [ 49 | "phpunit" 50 | ], 51 | "cover": [ 52 | "phpunit --coverage-html storage/coverage" 53 | ], 54 | "psr-fix": [ 55 | "phpcbf --standard=PSR12 src/NFe/ tests/" 56 | ], 57 | "check-style": [ 58 | "phpcs --colors --standard=PSR12 src/NFe/ tests/" 59 | ], 60 | "analysis": [ 61 | "phpstan analyse src/" 62 | ], 63 | "gen-class": [ 64 | "java -jar utils/SQLtoClass.jar -p utils/config.properties -t utils/template -o storage/generated" 65 | ] 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /docs/Gerar XML da NF-e - Guia de Uso da NFe_Util.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://www.flexdocs.com.br/guianfe/gerarNFe.html 3 | -------------------------------------------------------------------------------- /docs/GitHub - Maks3w-xmldsig- PHP Implementation of XML Digital Signature recomendation.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://github.com/Maks3w/xmldsig 3 | -------------------------------------------------------------------------------- /docs/GitHub - robrichards-xmlseclibs- A PHP library for XML Security.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://github.com/robrichards/xmlseclibs 3 | -------------------------------------------------------------------------------- /docs/LEGACY.md: -------------------------------------------------------------------------------- 1 | Ler certificados pfx antigos 2 | 3 | ou can enable legacy option for Openssl 3: 4 | 5 | Find and open the file at /etc/ssl/openssl.cnf 6 | 7 | At the [default_sect] section change it to the following: 8 | 9 | [default_sect] 10 | activate = 1 11 | [legacy_sect] 12 | activate = 1 13 | Then find the [provider_sect] and change it to the following: 14 | 15 | [provider_sect] 16 | default = default_sect 17 | legacy = legacy_sect 18 | -------------------------------------------------------------------------------- /docs/Manual de integração de olho no imposto.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/Manual de integração de olho no imposto.pdf -------------------------------------------------------------------------------- /docs/Manual_Integracao_Contribuinte_4.01-NT2009.006.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/Manual_Integracao_Contribuinte_4.01-NT2009.006.pdf -------------------------------------------------------------------------------- /docs/Manual_de_Especificações_Técnicas_do_DANFE_NFC-e_QR_Code - Versão 5.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/Manual_de_Especificações_Técnicas_do_DANFE_NFC-e_QR_Code - Versão 5.1.pdf -------------------------------------------------------------------------------- /docs/Manual_de_especificacoes_tecnicas_da_Contingencia_Off-line_versao_2.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/Manual_de_especificacoes_tecnicas_da_Contingencia_Off-line_versao_2.0.pdf -------------------------------------------------------------------------------- /docs/Painel de Monitoramento de Autorizadores de NFC-e.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://www.nfe.se.gov.br/portal/painelMonitor.jsp 3 | -------------------------------------------------------------------------------- /docs/Preenchimento_NFC-e_RJ.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/Preenchimento_NFC-e_RJ.pdf -------------------------------------------------------------------------------- /docs/Tabela Códigos de NCM.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://www.visaosolucoes.com.br/solucoes-contabilidade/77-tabela-codigos-de-ncm.html 3 | -------------------------------------------------------------------------------- /docs/Validador NF-e TecnoSpeed.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://validadornfe.tecnospeed.com.br/ 3 | -------------------------------------------------------------------------------- /docs/WebServices Oficial.txt: -------------------------------------------------------------------------------- 1 | Atualizado em 18-07-2017 2 | 3 | NFC-e: 4 | 5 | AC - SVRS: http://www.sefaznet.ac.gov.br/sefazonline/servlet/enderecows 6 | AL - RS: http://www.sefaz.al.gov.br/nfe/webservices.php 7 | AM - http://portalnfce.sefaz.am.gov.br/desenvolvedor/documentacao-tecnica/ 8 | AP - SVRS: https://www.sefaz.ap.gov.br/nota-fiscal-do-consumidor-eletronica/201-nfc-e 9 | BA - SVRS: https://www.sefaz.ba.gov.br/especiais/aviso_novos_cte.html 10 | CE - ? 11 | DF - SVRS: http://www.fazenda.df.gov.br/area.cfm?id_area=1115 12 | ES - ? 13 | GO - http://www.nfce.go.gov.br/post/ver/215366/quais-sao-os-web-services-da-nfc-e 14 | MA - ? 15 | MG - Não tem NFC-e 16 | MS - http://www.nfce.ms.gov.br/urls-webservices/ 17 | MT - https://www.sefaz.mt.gov.br/portal/nfce/?pg=cGdJbmZvcm1hY2Fv 18 | PA - SVRS: http://nfce.sefa.pa.gov.br/index.php/desenvolvedor 19 | PB - SVRS: https://www.receita.pb.gov.br/ser/images/docs/downloads/NFC-e/Web_Services_NFCe.pdf 20 | PE - SVRS: https://www.sefaz.pe.gov.br/Servicos/Nota-Fiscal-de-Consumidor-Eletronica/Paginas/Webservices-Producao-e-Homologacao.aspx 21 | PI - SVRS: http://www.sefaz.pi.gov.br/index.php/informacoes/imprensa/noticias/noticias-em-destaque/-novos-ambientes-de-autorizacao-de-documentos-na-receita-estadual-do-rs 22 | PR - http://www.sped.fazenda.pr.gov.br/modules/conteudo/conteudo.php?conteudo=97 23 | RJ - SVRS: http://www.fazenda.rj.gov.br/sefaz/content/conn/UCMServer/path/Contribution%20Folders/site_fazenda/informacao/sistemaseletronicos/nfe/Mudan%C3%A7a%20de%20URLs%20SVRS%20vers%C3%A3o%203.10.htm 24 | RN - SVRS: http://www.set.rn.gov.br/contentProducao/aplicacao/set_v2/nfce/gerados/relacao_de_webservices.asp 25 | RO - ?: http://www.nfce.sefin.ro.gov.br/docTecnica.jsp 26 | RR - SVRS: https://www.sefaz.rr.gov.br/nfce_site/download/roteiro_tecnico_nfce.pdf 27 | RS - https://www.sefaz.rs.gov.br/Site/MontaDuvidas.aspx?al=l_rel_end_ws_nfce 28 | SC - ? 29 | SE - SVRS: http://www.nfce.se.gov.br/portal/portalNoticias.jsp?jsp=barra-menu/documentos/tabelaEnderecoWebService.htm 30 | SP - http://www.nfce.fazenda.sp.gov.br/NFCePortal/Paginas/URLWebServices.aspx 31 | TO - ? -------------------------------------------------------------------------------- /docs/XML Editor-Viewer Online - xmlGrid.net.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://xmlgrid.net/ 3 | -------------------------------------------------------------------------------- /docs/cacert/ACREDEIDEIARFB.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIG2TCCBMGgAwIBAgIBHjANBgkqhkiG9w0BAQ0FADCBkDELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxNDAyBgNVBAsMK0F1dG9yaWRhZGUgQ2VydGlm 4 | aWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUxNjA0BgNVBAMMLUFDIFNlY3JldGFy 5 | aWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCB2NDAeFw0yMDAxMTcxMjMz 6 | MTVaFw0yOTAyMjAxMjMzMTVaMHYxCzAJBgNVBAYTAkJSMRMwEQYDVQQKEwpJQ1At 7 | QnJhc2lsMTYwNAYDVQQLEy1TZWNyZXRhcmlhIGRhIFJlY2VpdGEgRmVkZXJhbCBk 8 | byBCcmFzaWwgLSBSRkIxGjAYBgNVBAMTEUFDIFJFREUgSURFSUEgUkZCMIICIjAN 9 | BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqnP1+OGL/JsDm0HdFvXwVLKzugZp 10 | csalPQgulVHgPK6XPfbVJKQhguyWArT6ri0Wu3UpjRwx4J1gEf2czpGuYiTtMYBF 11 | e0jY1Tn58qebwShFj7L7IIeLmM9Y4HSewBA1yCDbKLStBeUFcPTV0x05qpMiulQu 12 | LB+mJm6UIoNFnTp17Pml+6FMWm9feEQRayIMeb5kg3PWLfeJaz++Z3HvChig8aun 13 | YMw6PQhiP3H2sldxJQDH9kmLS2fC9w5/yVvxwt8s42GjNEOmPlGfllCrznSqXx2L 14 | bN125pTP+D9gg72b8wbmZQ2jH5OoVnavSxxaPXwwriyawmYV7BqniS6Q76/UtNRX 15 | oSfim0XTVamhzi3Tt0JtozRlcuB+3DGnbxqbdsm6qEatz2Jja9tF9h5iqgttlL3o 16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sNITEvrxTZxVakPHQ0jSd79yvyP5cQYoIqMGO6q7B1Uhs 32 | U24HMEcF7eXJvNgK3vLHz6G2keZ0/EZx2Eyg0dPmmk4KIC8wWgTa3xpSK1fBTlRW 33 | Vu07z/J8bsMZXRO9GqAM/nC9TdsOaaoB+IYjhT45IOS5rL4Le7suGiwv2JX4VWeA 34 | oILhluJtc52/skESoeNVZ/EJbs5STeTxGxQ47MJvLK2c3UaKXwxOl0weJcP7jEpR 35 | kEgrXFYxOy54iCH89CJnGfaVN9x64RYT/OsOmT+vZHL2gs229uSyojch0oPBywQs 36 | OGceE4HzE5BahlkG9rBpQdhzlXTr/rmcMdhzRcSzeTViqtPEkCM4ZrCUNZ0lsaIK 37 | P6+b60pi/lKxezAZ6UhpEOYuLK4J4CFY89yewr8xcdsYmgx2VC/k0QSJ1tpZ0RaI 38 | LczTZLNmZ7R7e8dySBvoRJR1jSorQxzUxEKjlWE= 39 | -----END CERTIFICATE----- 40 | -------------------------------------------------------------------------------- /docs/cacert/ACSecretariadaReceitaFederaldoBrasilv4.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGYDCCBEigAwIBAgIBBDANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNpb25h 4 | bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMMK0F1 5 | dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUwHhcNMTYw 6 | NzIwMTMzMjA0WhcNMjkwMzAyMTIwMDA0WjCBkDELMAkGA1UEBhMCQlIxEzARBgNV 7 | BAoMCklDUC1CcmFzaWwxNDAyBgNVBAsMK0F1dG9yaWRhZGUgQ2VydGlmaWNhZG9y 8 | YSBSYWl6IEJyYXNpbGVpcmEgdjUxNjA0BgNVBAMML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dIwQYMBaAFGmovnXZxO9s5xNF5GFu5Wj4tkBe 25 | MA0GCSqGSIb3DQEBDQUAA4ICAQBrQuAL6TWbdnOpHbgSzAd9Pkc+vr5uTd7ml4xf 26 | PPs/I+BNCGT9Q6OTx/26m6q9rOrl6/9AASYDE5esiwBlaQ4OPzQQ37zrf5d4FnGx 27 | nsRMdjEL2pjks7ull66LZX8k5HOfnxy5iYo1hTy46UYg28PXdL55qTljilj4LueN 28 | FlTCmK2m9Vo1E6F/Ss79D31uwVBadgoK/i95dFONNlSj/w3/sa9Pbkq3JCJ10ET0 29 | 1GmBSTrtired+zzcj26QT0hjQQ5PUB6wV2+bhUx+WN/rXiLph/DPvy7gg8hrn4mV 30 | HBYOEPPoq7qBsX77cswycENKXrlq+gHA2Lj8hkrbfQt4pZQzT+6nLOSOyqMI21ql 31 | 781eErJySwJ0R9LdPQNm3MUS/ifoRPdjFGWUktBRue/03QrVYtwFBMaIjF/p93Bm 32 | b/42xfkL/TG/W6EicBcGLms2SU4pBtw+NDFMQ1YXxNJQoNJ2uzxnzBSqdr5bF5qZ 33 | th4EHob+I8uUFYylIoCHWvMD1pAxTu8fC9366lkt7cpBARiOdB2MN31JQK3nxjeQ 34 | eXHiudm8twSzNp0wbJViUiRfNZbqH3yNe8ZTYUQds7hCCcZh3pZbe4PNWS2WDiif 35 | F9uXRdfAL3qsEubQOrA/s+EvZha6afCs4d4BlGKQsf64r0iPnX6hFxR4h4sXRI9x 36 | 5xRMtA== 37 | -----END CERTIFICATE----- 38 | -------------------------------------------------------------------------------- /docs/cacert/AC_Certisign_G7.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGQTCCBCmgAwIBAgIBAzANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNpb25h 4 | bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW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Jp/f5mvKYwMCAwEAAaOBuzCBuDAUBgNVHSAEDTALMAkGBWBMAQEFMAAw 21 | PwYDVR0fBDgwNjA0oDKgMIYuaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJy 22 | L0xDUmFjcmFpenY1LmNybDAfBgNVHSMEGDAWgBRpqL512cTvbOcTReRhbuVo+LZA 23 | XjAdBgNVHQ4EFgQUgYIv2MZ9LW74+UfIooTUGSYN3ggwDwYDVR0TAQH/BAUwAwEB 24 | /zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAD3QRRQSKYd3KEGX 25 | SgMurtcPRlDkgrQ6n29C2soSCuHDu26+mEAclmjShJL79arHNy9hyEIUw1v3i9ap 26 | CcgjC0LINzQUFIHlzORFUekrYlcEwP7eS/gSODzc2aXBMgSOTbOdlA1Tyx+vPfmW 27 | oBlqiZ5osQokB8mSxz0nZgeM0yIThR8H1smWIEuxFXy5czJcydBc/WrDd8JGaLU8 28 | E8bZhkDYOYOpXIMOwgrkjk9doiXKr7RJ0ZNizd6vN4/KrZ/5EvDrL4Qf03y6CRxu 29 | tSxIRMN8qKlHfJWW2Qq/gGRDNoLLuyMaRE2ziDwkxTYhjDldZZGnkr921RgbvXPj 30 | zzvx+luZygPJ8jwLKePVBa71wLLhNNxFLQ0xzZpncIKmea143H8p5lGgALD7nLsQ 31 | cqbMTUBjcSwTmdUh2oiTgQ6T0Bf2UM18vnZLTEbaFt8XJvOHXITRjtrcmqIDAEMh 32 | ebG2THf3ouJ5G2eWzExly1ej1G9SvBjNlPhmro0j5T5O79eLnXWaWtmCj6+bKY/T 33 | hPQVBqrXgk6Fk2nTQLlty7Mcn0Ak3WR6yhzVQt5Mm5q3smJlG6rRasWDqNYaU+HO 34 | 7L586ufsN7aT4tNX11Uea5M8pnWXG3v5JpLxIg1MK5jOEc64TrOdtg+v8eUB5C8h 35 | KSkt+cronSVpq4fbZCBz42QVVsj0 36 | -----END CERTIFICATE----- 37 | -------------------------------------------------------------------------------- /docs/cacert/AC_Prodemge_BR.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGQDCCBCigAwIBAgIBDDANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNpb25h 4 | bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMMK0F1 5 | dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUwHhcNMTgw 6 | ODI5MTM1MzE0WhcNMjkwMzAyMTIwMDE0WjBxMQswCQYDVQQGEwJCUjETMBEGA1UE 7 | CgwKSUNQLUJyYXNpbDE0MDIGA1UECwwrQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3Jh 8 | IFJhaXogQnJhc2lsZWlyYSB2NTEXMBUGA1UEAwwOQUMgUHJvZGVtZ2UgQlIwggIi 9 | MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChvzx4mDiJQRHub1zwsJj9H/+Y 10 | U/pgUh4Pz0d/gN/QlJTPS/vpWDhPoFWDjuBiy73a1NodIVcmorGVYpIN3SYWTOLf 11 | M84vFz5UV0gmYbaEgFsY8RULRGtDYC7TxV0fXSF34MHqWtRYDp8AjHsCYDaJmx+a 12 | 1Spcnrodrphgz2usr3eN24Efs69HHphEJHAtrs9B/fuQayIZEwMUyz9azmciudS9 13 | o2GVXnECHhYOTfoLdG2OEe+RxdOrYhNjmRuoxAfyLO8zl1QVRMgFmw+rFamaX+fy 14 | pmGvHJCp9zj1l5UxinEqqlOpIKuqjNEyytfvS5hGLjrTLy7Y4SrudqRddEeeZeTd 15 | lEhX1/kso/WvFYYvKMr5Y+hbQzcNcPb6TxibGmm0ynmT0zanz7ZPdbuchlq8Zc9O 16 | 6YYbRq7y4mrvrNRRvudk8Ettm8SLRRumOo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l7lXCjVTTf9Qv5QRHe3jyvzydeqYV1boOmOw6UraWkUyaM7 33 | Poq/iof50fxkgyeLxKwrJNatoNjpkJYEDHfGQ6KIReqKqtrSO89Z2tFQGLNPWjd4 34 | i20R9bZVsJ6BN5Qwa95scqOEquejf3IkrFWNKlTGyKOzE7DUaSguf2V8Taqky46B 35 | Of8pA2o+5d8uCRfu5cJBizezSXI= 36 | -----END CERTIFICATE----- 37 | -------------------------------------------------------------------------------- /docs/cacert/AC_Prodemge_MG.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGkjCCBHqgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBxMQswCQYDVQQGEwJCUjET 3 | MBEGA1UECgwKSUNQLUJyYXNpbDE0MDIGA1UECwwrQXV0b3JpZGFkZSBDZXJ0aWZp 4 | Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYSB2NTEXMBUGA1UEAwwOQUMgUHJvZGVtZ2Ug 5 | QlIwHhcNMTgwODMxMTUyMDMzWhcNMjkwMzAxMTUyMDMzWjBUMQswCQYDVQQGEwJC 6 | UjETMBEGA1UEChMKSUNQLUJyYXNpbDEXMBUGA1UECxMOQUMgUHJvZGVtZ2UgQlIx 7 | FzAVBgNVBAMTDkFDIFByb2RlbWdlIE1HMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A 8 | MIICCgKCAgEApWGLOCwpZr3PpyxVMR6x+os6/i3v2FOgEh8/8/bfUkv7qrIAfuy0 9 | Bqre/F+ZVVAnySqXObEMpQAtovqgLBEzzv1dcPyd6FLjHCqyuPNzRQLACAtEZJ/U 10 | A7pyKDiDspGwS0FyEYfMbxC7U0nuQnliJmANPJuc6SrAnnWBT7aimDI1ztxoJfCc 11 | lLVPZI/gft5uKK06p3wnsJvTZDYivvr45Vmf9715e0lvaad70qdE9YJZjQS0QWES 12 | I5iMwlTc+nx/Tpn7JmEwkNxS1K2n8EA6NxahnYQAjmNMrlnKkCd8nWi9WxE66ZSs 13 | sp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EqE7ntlngT6lowWA9B9CbGim1Ftg 29 | Kwo8AmcI7089mFUOaYAxhqyfuWHZtLHqYW+R0vuhkObSMHjQU2EIBCC69QlmGHgL 30 | Qa3PmNuQJWDvm8h+5XD3qqjnyg8h7PlBxPtOrpVip8a2zdz3fsBMV/cq8ssbwRvw 31 | cEcfu6vpyp8kpSHhUgVLCk7f5xfD35qlFeN9YAP8/n0vS85sqYKxUPKmm/HQQ8AL 32 | JRc32A5emksUw2snpJLeGvY/A8fC61YLq6KonLhVBt+nqHPPykD4BRa0qJw6Dq9t 33 | HLefim22LQzRzbOFnRpFDYYJfkwNQen5f3xwUzzx4UJsruQLR53BE8ocpeiB9+iY 34 | gmn4e+DcQKYM/HI0ha0zseX6xnDJeANg1JYbO4Jprb4cw26XkM+NDGkIC3FM4yJ/ 35 | EtufNwOykEiG9ELCpou+ay8nnNXM0MKzMLiKmPjllY8rN84k309jHACy0RAbrCMf 36 | RXW3FZlBCKEfqpwOloJzBtDA10S6tplStVYjApy785Dr1B463CC1f+aow15/FirH 37 | hUh4GtCy 38 | -----END CERTIFICATE----- 39 | -------------------------------------------------------------------------------- /docs/cacert/AC_Prodemge_SSL.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGljCCBH6gAwIBAgIBAzANBgkqhkiG9w0BAQ0FADBxMQswCQYDVQQGEwJCUjET 3 | MBEGA1UECgwKSUNQLUJyYXNpbDE0MDIGA1UECwwrQXV0b3JpZGFkZSBDZXJ0aWZp 4 | Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYSB2NTEXMBUGA1UEAwwOQUMgUHJvZGVtZ2Ug 5 | QlIwHhcNMTgwODMxMTUzNzIxWhcNMjkwMzAxMTUzNzIxWjBVMQswCQYDVQQGEwJC 6 | UjETMBEGA1UEChMKSUNQLUJyYXNpbDEXMBUGA1UECxMOQUMgUHJvZGVtZ2UgQlIx 7 | GDAWBgNVBAMTD0FDIFByb2RlbWdlIFNTTDCCAiIwDQYJK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R0fBGQwYjBgoF6gXIZaaHR0cDovL2ljcC1icmFzaWwuYWMu 24 | cHJvZGVtZ2UuZ292LmJyL3JlcG9zaXRvcmlvL2xjci9hY19wcm9kZW1nZV9ici9s 25 | Y3JfYWNfcHJvZGVtZ2VfYnIuY3JsMB8GA1UdIwQYMBaAFMjIFk7EXIQRehy5g3xT 26 | Hc9uwCPJMA0GCSqGSIb3DQEBDQUAA4ICAQAInMOwAqAcAuafvSQgaoPDm8Oc/PfV 27 | KQDCsrwTlgDx9TLo773VnHXNIHLu9f1VV/sGDVu2EsQZkNyOg0pnzmEhyHuesRdG 28 | ncP4Ujb474z3BQbEdyzg8nB+rsV6UKGN+xdnbqFnkVZm8vTZhEX3JvB7SaAYKHjk 29 | ftfN4syY7RjvSWk1brkrvRTFUHSLXqNvViNkVP226XZ+zvuDBGJvzhYAIn39noNk 30 | vjSmOK6qeabdejsvhkFaKY8FMcwXzF72lvDl6YBKH11d5mShv1psZ+6ubhsLwSwN 31 | EnU09r32ck6GayI398ib264qKCSq8sWqmoYUAG12aX/yfSBBOPxVp3xm0R3Ugm9f 32 | hgc7RoDbZfma2XXyrKJ6TrK6gEm+giugL+fT4ne3tAk1vAvvLfcCVn0rNBKapaHY 33 | n4HPp3dMAFDvuNDHZEXLh2rBaUmJA8bh+R2uzsIAsQXT+9UcenBXtLcnUg4WuRXE 34 | 5clQxUV2TQABRkmTdJD5aMiR8E1JcR+trZYAk1oT83TGyZxH8IKa5NK66oSlPKRx 35 | Jftwgo8CJcdeI1+jWfzJdFwBut84AQO0Fi58F8gqTdVzL0ex4yDR+FP82jirdTMC 36 | IvTEYIVMDjyQ37pDQ35vhoqO0x2RDN48n24AN+nsuNIi6NFGeVZMUf0m9s2g8pGC 37 | DdVLnXBHHOSLng== 38 | -----END CERTIFICATE----- 39 | -------------------------------------------------------------------------------- /docs/cacert/AC_Prodemge_SSL_v2.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIG/jCCBOagA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4+EC4lSzkjPRGQY7UY/5LDT6i6/7fWe8ObZc8 34 | pOcNBhVdBjn0JX9DSDqAIz2mvLE/MlAiq3xVWckYBl321EAIvsuCbkS8rbMVFulL 35 | M4s3rAPKRJU/PTUtswepIfRmyr8mLBzhT1CHwLtz/i/cPAZSH7D48ecRl+P9RAzO 36 | eyoIHIaMNRFNScj0b8MvRHRlb6+nqjVZ/OYXCCVbvR95eCuUo4UenNw4qpnyGweJ 37 | ot+zAs5DgIFG7iOPe5zaP5zojRW17tQhNiMDOklHvuwRHGp8B3CCnFPyMIEet2aQ 38 | qFFJM0l2+X2s6DRzUrMUsVhihxnoOmCswEFwlVmC/qHtuzZgUQYw3tGzyuOlq6g9 39 | ODrWcrhb32V5O06znnrZVeSR 40 | -----END CERTIFICATE----- 41 | -------------------------------------------------------------------------------- /docs/cacert/Autoridade_Certificadora_Raiz_Brasileira_v10.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGrDCCBJSgAwIBAgIJANLVi0S/gZNCMA0GCSqGSIb3DQEBDQUAMIGYMQswCQYD 3 | VQQGEwJCUjETMBEGA1UECgwKSUNQLUJyYXNpbDE9MDsGA1UECww0SW5zdGl0dXRv 4 | IE5hY2lvbmFsIGRlIFRlY25vbG9naWEgZGEgSW5mb3JtYWNhbyAtIElUSTE1MDMG 5 | A1UEAwwsQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3JhIFJhaXogQnJhc2lsZWlyYSB2 6 | MTAwHhcNMTkwNzAxMTkxNTU5WhcNMzIwNzAxMTIwMDU5WjCBmDELMAkGA1UEBhMC 7 | QlIxEzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNp 8 | b25hbCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNTAzBgNVBAMM 9 | LEF1dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjEwMI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//J9TevF866s+pKbaGLpFYzAPBgNV 26 | HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQ0FAAOCAgEA 27 | eCNhBSuy/Ih/T+1VOtAJju85SrtoE3vET1qXASpmjQllDHG/ph7VFNRAkC+gha+B 28 | CbjoA5oJ/8wwl+Qdp1KGz6nXXFTLx3osU+kjm0srmBf9nyXHPqvFyvBeB0A7sYb7 29 | TmII9GKD20oCxsdkccR/oE/JuTaNnGq0GYZ2aDb5v62uLi21Y6P9UBiTxZqQ4ojW 30 | ET6kXNjlK238jpXv17FR8Sg3VusCvX7Q8eJkavvHHZDeWck2fSA+ycAc2JeL2Z0B 31 | MSxGWpH32WM9J8+6XqCJUXHiWEV0zCE8wDYiYC+047pTxQI/gB/FcU7jvylh98DJ 32 | kQPHd/Tp6Og3ynlDA9n9uBbxYHVRZs9vsZ/7xTFaxRe+zk8dhgKgZ/3RrcMFB570 33 | 2t8LFbyuUE/kQVY6rZ0QJ9qMWQ7VPLRwRhiMeU3k8WDJb/tBbOXHBqldTbWyQ+mp 34 | MEDWhbrzE/IED82wAuO23Tb05cYk2xC7+Izef8fSc3XdJDuPSbcDpWukzyCDtSEH 35 | isLiGEtIbYRiPsF3czlQPsnIEVoTTCWxHCH1zYR6zScSv18Qh69qVe2J40K5jZoP 36 | GEOhq/oKhVJQAdvAFW5Odp7mF3Tk9nivjjsctJSxY26LFiV5GRV+07SSse4ti0aO 37 | jO5PLg5SWjfcOtBG2rz02EIvQAmLcb0kGBtfdj0lW/w= 38 | -----END CERTIFICATE----- 39 | -------------------------------------------------------------------------------- /docs/cacert/Autoridade_Certificadora_Serpro_v4.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGVTCCBD2gAwIBAgIBBTANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWN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bbIHx+v7wnnB2O/1N6j4OBlBiCDrzEAg1abJQLHEL8Wy3sIQ8Map8= 36 | -----END CERTIFICATE----- 37 | -------------------------------------------------------------------------------- /docs/cacert/Autoridade_Certificadora_do_Serpro_Final_SSL.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGsDCCBJigAwIBAgIBAjANBgkqhkiG9w0BAQ0FADCBhTELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxNDAyBgNVBAsMK0F1dG9yaWRhZGUgQ2VydGlm 4 | aWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUxKzApBgNVBAMMIkF1dG9yaWRhZGUg 5 | Q2VydGlmaWNhZG9yYSBTRVJQUk8gdjQwHhcNMTcwMTA5MTkzNjUyWhcNMjkwMjE1 6 | MTkzNjUyWjCBpzELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxDzAN 7 | BgNVBAsMBkNTUEItMTE7MDkGA1UECwwyU2VydmljbyBGZWRlcmFsIGRlIFByb2Nl 8 | c3NhbWVudG8gZGUgRGFkb3MgLSBTRVJQUk8xNTAzBgNVBAMMLEF1dG9yaWRhZGUg 9 | Q2VydGlmaWNhZG9yYSBkbyBTRVJQUk8gRmluYWwgU1NMMIICIjANBgkqhkiG9w0B 10 | AQEFAAOCAg8AMIICCgKCAgEA0007L/otgdyAkxQnHLBs0ZOTn1+WD5CJWzOt+Cd0 11 | zkvs2B/GpceoizOpThqyb5gv+li3QmZpHEjvtteVqYYLNq0yBkOZvn/U093gT4NX 12 | ISBCAE+KHM4meT8Uf4DvaGWnLVT/J/enSDwaYkG1EZc+OS8Tx/iRkdUGiDnRgxZN 13 | tWgdToZMQCDtdOygUX3nBR2q75ehDQqeNVcXY2KHGkEryaixuqYsXkYOrevLHBf/ 14 | 5rtfHLo6mHi7KyvPcUd77ClM/sinRD3mf7oH1A9fZCpbalZ8HQGcvDAjEfxSUV9X 15 | 2lCT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3PH8SDrI0/ia7B8gAtBuEcPMH32 31 | 8STXfswjeeyRVG4/CCGApyHLxHgkukQVXnHX0ADekkDuAnSE7rK5ZJzy7TDGB7Qm 32 | sgKOTw6jgVVzbuevRR7UwhfYwpuBHFNH4qNJxOUcXN0sFBRJ9Sx9xe25cNIbkzpM 33 | bfWfe6bUXX3lvl2L12i9XtGYNkD2VR35j/t+smv+Y5sx7QbBU+4EXN4A9rB94yU1 34 | 0JYVyk0NooHoWFR8/nZPRBq7rMC4+7XLbXIwj0OMJ64MvITk4sTJjpVUK7Ynjd3g 35 | pfVuBOCzXxXNtY3ACRuKaRr7xuv1eH8dHtqCExnHiPszA6IiaiiWNH/NSqX9RKLS 36 | N4z++tb62qORAcmfQi+p0rJr5l2bTRyRJfPvdGsmgqTXen8VArlYwV/ZlksqwDi2 37 | DFxbj1i4W3JJfX3DwPokb7qgCu/ZHjypAFXU6AT16IrosKdl 38 | -----END CERTIFICATE----- 39 | -------------------------------------------------------------------------------- /docs/cacert/ICP-Brasilv5.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGoTCCBImgAwIBAgIBATANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNpb25h 4 | bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMMK0F1 5 | dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUwHhcNMTYw 6 | MzAyMTMwMTM4WhcNMjkwMzAyMjM1OTM4WjCBlzELMAkGA1UEBhMCQlIxEzARBgNV 7 | BAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNpb25hbCBkZSBU 8 | ZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMMK0F1dG9yaWR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bOcTReRhbuVo+LZA 25 | XjAdBgNVHQ4EFgQUaai+ddnE72znE0XkYW7laPi2QF4wDwYDVR0TAQH/BAUwAwEB 26 | /zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBABRt2/JiWapef7o/ 27 | plhR4PxymlMIp/JeZ5F0BZ1XafmYpl5g6pRokFrIRMFXLyEhlgo51I05InyCc9Td 28 | 6UXjlsOASTc/LRavyjB/8NcQjlRYDh6xf7OdP05mFcT/0+6bYRtNgsnUbr10pfsK 29 | /UzyUvQWbumGS57hCZrAZOyd9MzukiF/azAa6JfoZk2nDkEudKOY8tRyTpMmDzN5 30 | fufPSC3v7tSJUqTqo5z7roN/FmckRzGAYyz5XulbOc5/UsAT/tk+KP/clbbqd/hh 31 | evmmdJclLr9qWZZcOgzuFU2YsgProtVu0fFNXGr6KK9fu44pOHajmMsTXK3X7r/P 32 | wh19kFRow5F3RQMUZC6Re0YLfXh+ypnUSCzA+uL4JPtHIGyvkbWiulkustpOKUSV 33 | wBPzvA2sQUOvqdbAR7C8jcHYFJMuK2HZFji7pxcWWab/NKsFcJ3sluDjmhizpQax 34 | bYTfAVXu3q8yd0su/BHHhBpteyHvYyyz0Eb9LUysR2cMtWvfPU6vnoPgYvOGO1Cz 35 | iyGEsgKULkCH4o2Vgl1gQuKWO4V68rFW8a/jvq28sbY+y/Ao0I5ohpnBcQOAawiF 36 | bz6yJtObajYMuztDDP8oY656EuuJXBJhuKAJPI/7WDtgfV8ffOh/iQGQATVMtgDN 37 | 0gv8bn5NdUX8UMNX1sHhU3H1UpoW 38 | -----END CERTIFICATE----- 39 | -------------------------------------------------------------------------------- /docs/cacert/README.md: -------------------------------------------------------------------------------- 1 | ## Agrupar cadeia de certificados 2 | Rodar comandos para aplicar novos arquivos adicionados 3 | 4 | Entre na pasta 5 | ```sh 6 | cd docs/cacert 7 | ``` 8 | 9 | Rode o comando (Linux apenas) 10 | ```sh 11 | ./append_cert.sh 12 | ``` 13 | 14 | Ver a data de validade dos certificados (Linux apenas) 15 | ```sh 16 | ./list_dates.sh 17 | ``` 18 | 19 | Verificar conexão usando certificado 20 | ```sh 21 | curl -v --cacert docs/cacert/cacert.pem --key storage/certs/private.pem --cert storage/certs/public.pem https://homologacao.nfce.sefa.pr.gov.br 22 | ``` 23 | 24 | ```sh 25 | curl -v --cacert docs/cacert/cacert.pem --key storage/certs/private.pem --cert storage/certs/public.pem https://nfce.fazenda.mg.gov.br 26 | ``` 27 | -------------------------------------------------------------------------------- /docs/cacert/ac-soluti-v5.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGPjCCBCagAwIBAgIBCzANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxPTA7BgNVBAsMNEluc3RpdHV0byBOYWNpb25h 4 | bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMMK0F1 5 | dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUwHhcNMTgw 6 | NjI5MTg1NTIwWhcNMjkwMzAyMTIwMDIwWjBvMQswCQYDVQQGEwJCUjETMBEGA1UE 7 | ChMKSUNQLUJyYXNpbDE0MDIGA1UECxMrQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3Jh 8 | IFJhaXogQnJhc2lsZWlyYSB2NTEVMBMGA1UEAxMMQUMgU09MVVRJIHY1MIICIjAN 9 | BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtoQbmI4YZawD53+Un9kiyaLa1Yf0 10 | OtZ1HtRX8dEJ/a8gMegdj8octdGAid1SKe7IMYRCN554iZldoDhfK7YLJxbjQaT/ 11 | OfA7fRu6uA7z7joS34zdYhEN4P4EgL3DTCQPVzStjExIhu+qG0VV4cuZQ8n+jrRL 12 | 653/liXqTwgVJd1YHZO/vQnjWWUmuANO1Gxp/cIRjASUenW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pq2r52q/1SRaRZHWYwMc2o823nb57f 29 | jP+n21Ccxnve2j3a1lmsCbpvfwgkku9xTzOE3BhTSFYMUGeD7FUfSmztTxuvtYGG 30 | 4dKqfHXYmKE/GHtrKwbj4zU9DNsItO4BXCGnJg+Cm/1qJAvCBT8NHMwPp82jvxc7 31 | JC3KSREmLFQfhj5ndMi0T/B0HWhOEpe30GeZQToRxjPjV68UBjURNzEybWMTQwPf 32 | 5hx6TtxCQ1ogUNR9Em/qmt3EWxXB+JDv3CgjeCNgzQQ8AQHdAvRYDu7z8xNhTaE+ 33 | SL9+Ctp1LS9O9n8Miu4ZwsG/WP0A36ftUQSZ9QizDue2iS4HCvK8qhBWmqq8bF5p 34 | nPWCXSxxj7x+rKo648BBJSKpd4B5sQW+YG43ONUuE6VmFio4ofrwjvf+xZVoghfk 35 | ADeq6/5hsGNJsLzXDfr6hCDB 36 | -----END CERTIFICATE----- 37 | -------------------------------------------------------------------------------- /docs/cacert/acserproacfv5.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIG8DCCBNigAwIBAgIBAzANBgkqhkiG9w0BAQ0FADCBhTELMAkGA1UEBhMCQlIx 3 | EzARBgNVBAoMCklDUC1CcmFzaWwxNDAyBgNVBAsMK0F1dG9yaWRhZGUgQ2VydGlm 4 | aWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjUxKzApBgNVBAMMIkF1dG9yaWRhZGUg 5 | Q2VydGlmaWNhZG9yYSBTRVJQUk8gdjQwHhcNMTcwMjA2MTkwNzU0WhcNMjkwMjE1 6 | MTkwNzU0WjCBlTELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxOzA5 7 | BgNVBAsMMlNlcnZpY28gRmVkZXJhbCBkZSBQcm9jZXNzYW1lbnRvIGRlIERhZG9z 8 | IC0gU0VSUFJPMTQwMgYDVQQDDCtBdXRvcmlkYWRlIENlcnRpZmljYWRvcmEgZG8g 9 | U0VSUFJPIEZpbm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DmgN6A1hjNodHRw 25 | Oi8vcmVwb3NpdG9yaW8uc2VycHJvLmdvdi5ici9sY3IvYWNzZXJwcm92NC5jcmww 26 | HwYDVR0jBBgwFoAU9RddRbvAAPgt2US230QSKux5JZswHQYDVR0OBBYEFOiTq+N3 27 | x1HoGpzuZFyPf7+qyW+QMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG 28 | MA0GCSqGSIb3DQEBDQUAA4ICAQCFCJwmhlb3LF1yNtOa9JqJCZrmKTn/+keMDhYr 29 | iACLluRwdrT71kfWGvcj14seNuuQA+kcC6wCv8c0yfSDh9C6swpEi4K5wP7k01KI 30 | +Jd0Hb5DEmz1I1hlM3lhc7+Bo6Yus272GRD8uuI56qFUmeYwzRwwsZei06r4K8V5 31 | HR2kxMTmLuPeqPGpC677DGQ6vDqpPZ8YRz1mnzPmGhPYuiQe8jrhXl2oyNVjF9wC 32 | tonz3pAh5nvI2ipag8MZsqG2hKCTTDhobHjquCS33es4AM1fZ2nns/YQ3T7S95oO 33 | Olu3m3eAQI0yA6zGR/um7kFwZYfti86oGXDfXN4HHzv+CaCwhUqO+If3vsszGqS/ 34 | JL11UXmQzNUe75Xs3YDankHIYsUeTV2XIm9COZUqc4ciMVuPaxhofrHfdhsEnfAN 35 | OB9KYSUPoFaX1Ia0ZndJgzhxnMLLyyAxuLWiOol5pD1gdWSqJxFYEEqOapFWEsQ1 36 | uEr73tSHbc8iV9V5uvMic4chg6Gwfl7OErO5oQY8v85DNwiP6+z1xpN37pWBxxcO 37 | yT5L9LpbbNcSSHNfjrYR2owcwDtIyaWmQcxeX4jAjpme5ffB1YGanOM7b43A9DLM 38 | 2/9o4kFe+LeBiC+SqyFWZgB7HbP+qgvIJmo4NzRZmnbPFPQDo4A9swXzAi8S1/k2 39 | C6XGHA== 40 | -----END CERTIFICATE----- 41 | -------------------------------------------------------------------------------- /docs/cacert/append_cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | FILE_LIST=$(find ./ -name "*.crt") 5 | cat cacert_mozilla.pem > cacert.pem 6 | for file in $FILE_LIST 7 | do 8 | name=$(echo "$file" | cut -d / -f 2) 9 | echo "" >> cacert.pem 10 | echo "$name" >> cacert.pem 11 | echo "$name" | sed -r 's/./=/g' >> cacert.pem 12 | cat "$file" >> cacert.pem 13 | done 14 | -------------------------------------------------------------------------------- /docs/cacert/list_dates.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | FILE_LIST=$(find ./ -name "*.crt") 5 | for file in $FILE_LIST 6 | do 7 | name=$(echo $file | cut -d / -f 2) 8 | echo -n "$name -> " && keytool -printcert -file $file | grep until 9 | done 10 | -------------------------------------------------------------------------------- /docs/cacert/update_mozilla_certs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | curl "https://curl.se/ca/cacert.pem" -o cacert_mozilla.pem 4 | -------------------------------------------------------------------------------- /docs/certs/certificado.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/certs/certificado.pfx -------------------------------------------------------------------------------- /docs/contingencia_offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/docs/contingencia_offline.png -------------------------------------------------------------------------------- /docs/ericmaicon-nfe- Projeto em PHP que contempla a criação do arquivo XML, assinatura, Validação do XSD e Envio para o SEFAZ de NFE (Nota fiscal Eletrônica)-.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://github.com/ericmaicon/nfe 3 | -------------------------------------------------------------------------------- /docs/exakat-php-static-analysis-tools- A reviewed list of useful PHP static analysis tools.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://github.com/exakat/php-static-analysis-tools 3 | -------------------------------------------------------------------------------- /docs/regex.txt: -------------------------------------------------------------------------------- 1 | ^([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*)$ 2 | 3 | \t\t\t"$1": { "importado": $6, "nacional": $5, "estadual": $7, "municipal": $8, "ex": "$2", "tipo": "$3" }, 4 | 5 | \t\t\t"([^"]+)":(.*?), "ex": "([^"]+)", (.*?)$ 6 | \t\t\t"$1.$3":$2, $4 -------------------------------------------------------------------------------- /examples/nfce_simples/Processador.php: -------------------------------------------------------------------------------- 1 | setConfiguracao($this); 20 | // informa que as notas serão obtidas desse gerador 21 | $this->setBanco(new Gerador()); 22 | 23 | $storage = dirname(dirname(__DIR__)) . '/storage'; 24 | // informa a pasta onde serão salvos os arquivos XML 25 | $pasta_xml = $storage . '/xml'; 26 | Util::createDirectory($pasta_xml); 27 | $this->setPastaXmlBase($pasta_xml); 28 | // informa onde estão os arquivos do certificado 29 | $this->getCertificado()->setArquivoChavePublica($storage . '/certs/public.pem'); 30 | $this->getCertificado()->setArquivoChavePrivada($storage . '/certs/private.pem'); 31 | // informa o token e o CSC 32 | $this->setToken($info['contrib']['token']); 33 | $this->setCSC($info['contrib']['csc']); 34 | 35 | /* Informações do emitente */ 36 | $this->getEmitente()->setRazaoSocial($info['emitente']['razao_social']); 37 | $this->getEmitente()->setFantasia($info['emitente']['fantasia']); 38 | $this->getEmitente()->setCNPJ($info['emitente']['cnpj']); 39 | $this->getEmitente()->setIE($info['emitente']['ie']); 40 | $this->getEmitente()->setRegime(Emitente::REGIME_SIMPLES); 41 | 42 | /* Endereço do emitente */ 43 | $endereco = $this->getEmitente()->getEndereco(); 44 | $endereco->setCEP($info['emitente']['endereco']['cep']); 45 | $endereco->getMunicipio() 46 | ->setNome($info['emitente']['endereco']['cidade']) 47 | ->getEstado() 48 | ->setNome($info['emitente']['endereco']['estado']) 49 | ->setUF($info['emitente']['endereco']['uf']); 50 | $endereco->setBairro($info['emitente']['endereco']['bairro']); 51 | $endereco->setLogradouro($info['emitente']['endereco']['logradouro']); 52 | $endereco->setNumero($info['emitente']['endereco']['numero']); 53 | return $this; 54 | } 55 | 56 | /** 57 | * Processa as notas e tarefas 58 | * @return int quantidade de notas processadas 59 | */ 60 | public function processa() 61 | { 62 | return SEFAZ::getInstance()->processa(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /examples/nfce_simples/README.md: -------------------------------------------------------------------------------- 1 | ### Nessa página será abordado como estruturar seu projeto para emitir nota fiscal usando a bilioteca NFe-API 2 | 3 | - Informações necessárias para emissão de notas 4 | 1. Certificado digital A1 e a senha do mesmo 5 | 2. Token e CSC do contribuinte 6 | 3. Informações da empresa que irá emitir as notas (Razão Social, CNPJ, Inscrição Estadual, Endereço, Regime tributário) 7 | 8 | ### Funcionamento 9 | Essa biblioteca usa o conceito de eventos para executar ações, logo terá evento para nota autorizada, cancelada e outros. 10 | Em cada evento você poderá salvar o XML e atualizar o status da nota no banco de dados. 11 | 12 | Há dois tipos de objetos processados pela biblioteca, a Nota e a Tarefa. As notas devem ser criadas nos eventos ```\NFe\Database\Estatico::getNotasAbertas``` e ```\NFe\Database\Estatico::getNotasPendentes```, já as tarefas devem ser criadas no evento ```\NFe\Database\Estatico::getNotasTarefas``` e são responsáveis por inutilizar numerações, realizar cancelamento e consultar notas. 13 | 14 | ### Emitindo uma NFC-e 15 | Para emitir uma NFC-e, iremos usar o exemplo da pasta [examples/nfce_simples](/mazinsw/nfe-api/tree/master/examples/nfce_simples) 16 | 1. Faça o clone dessa biblioteca pelo comando ```git clone https://github.com/mazinsw/nfe-api.git``` ou baixe o ZIP e faça a descompactação. 17 | 2. Entre na pasta clonada ou descompactada e rode o comando ```composer install``` 18 | 3. Crie a pasta ```storage/certs``` e cole seu certificado nela com o nome ```certificado.pfx``` 19 | 4. Entre na pasta ```examples/nfce_simples``` e altere o arquivo ```index.php``` preenchendo os campos ```$senha_certificado```, ```$contribuinte```, ```$endereco```, ```$emitente``` e salve o arquivo. 20 | 5. Na pasta ```examples/nfce_simples``` execute o comando ```php index.php``` 21 | 22 | No terminal deve ser exibido a mensagem ```1 notas processadas``` ou ```0 notas processadas``` em caso de falhas. 23 | 24 | Aumente o número da nota no passo 4 para emitir outra NFC-e. 25 | 26 | Para ver o XML autorizado, acesse a pasta ```storage/xml/homologacao/autorizado``` e abra o XML com o Google Chrome 27 | 28 | Para ver os logs, acesse a pasta ```storage/logs``` 29 | -------------------------------------------------------------------------------- /examples/nfce_simples/index.php: -------------------------------------------------------------------------------- 1 | 'INFORME O CSC AQUI', 20 | 'token' => '000001', // altere caso seja diferente 21 | ]; 22 | 23 | /* Endereço do emitente */ 24 | $endereco = [ 25 | 'cep' => '', 26 | 'cidade' => 'Rio de Janeiro', 27 | 'estado' => 'Rio de Janeiro', 28 | 'uf' => 'RJ', 29 | 'bairro' => 'Centro', 30 | 'logradouro' => '', 31 | 'numero' => '', 32 | ]; 33 | 34 | /* Informações do emitente */ 35 | $emitente = [ 36 | 'razao_social' => 'RAZÃO SOCIAL DA EMPRESA', 37 | 'fantasia' => 'NOME FANTASIA DA EMPRESA', 38 | 'cnpj' => '', // CNPJ da empresa 39 | 'ie' => '', // Inscrição estadual da empresa 40 | 'endereco' => $endereco, 41 | ]; 42 | 43 | /* próximo numero a ser gerado a NFC-e */ 44 | $numero_da_nota = 1; 45 | 46 | /* Não precisa alterar daqui pra baixo */ 47 | 48 | $cert_dir = dirname(dirname(__DIR__)) . '/storage/certs'; 49 | $certificado = new Certificado(); 50 | $certificado->setArquivoChavePublica($cert_dir . '/public.pem'); 51 | $certificado->setArquivoChavePrivada($cert_dir . '/private.pem'); 52 | $certificado->carrega($cert_dir . '/certificado.pfx', $senha_certificado, true); 53 | 54 | $processador = new Processador(); 55 | $processador->init([ 56 | 'contrib' => $contribuinte, 57 | 'emitente' => $emitente, 58 | ]); 59 | $processador->getBanco()->nota_numero = $numero_da_nota; 60 | $quantidade = $processador->processa(); 61 | echo "{$quantidade} notas processadas"; 62 | -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | ignoreErrors: 3 | - 4 | message: "#^Parameter \\#1 \\$objDoc of method RobRichards\\\\XMLSecLibs\\\\XMLSecurityDSig\\:\\:locateSignature\\(\\) expects DOMDocument, DOMNode given\\.$#" 5 | count: 1 6 | path: src/util/XmlseclibsAdapter.php 7 | 8 | - 9 | message: "#^Call to function is_null\\(\\) with [\\w()\\\\]+ will always evaluate to false\\.$#" 10 | count: 1 11 | path: src/NFe/Logger/Log.php 12 | 13 | - 14 | message: "#^Call to function is_null\\(\\) with [\\w()\\\\]+ will always evaluate to false\\.$#" 15 | count: 1 16 | path: src/NFe/Core/SEFAZ.php 17 | 18 | level: 5 19 | paths: 20 | - src 21 | - tests 22 | checkMissingIterableValueType: false 23 | checkGenericClassInNonGenericObjectType: false 24 | treatPhpDocTypesAsCertain: false 25 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | src/NFe 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | tests/NFe/ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/NFe/Common/Node.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in all 18 | * copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | * 28 | */ 29 | 30 | namespace NFe\Common; 31 | 32 | interface Node 33 | { 34 | public function getNode($name = null); 35 | public function loadNode($element, $name = null); 36 | } 37 | -------------------------------------------------------------------------------- /src/NFe/Core/NFe.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in all 18 | * copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | * 28 | */ 29 | 30 | namespace NFe\Core; 31 | 32 | /** 33 | * Classe para validação da nota fiscal eletrônica 34 | */ 35 | class NFe extends Nota 36 | { 37 | public function __construct($nfe = []) 38 | { 39 | parent::__construct($nfe); 40 | $this->setModelo(self::MODELO_NFE); 41 | } 42 | 43 | public function toArray($recursive = false) 44 | { 45 | $nfe = parent::toArray($recursive); 46 | return $nfe; 47 | } 48 | 49 | public function fromArray($nfe = []) 50 | { 51 | if ($nfe instanceof NFe) { 52 | $nfe = $nfe->toArray(); 53 | } elseif (!is_array($nfe)) { 54 | return $this; 55 | } 56 | parent::fromArray($nfe); 57 | return $this; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/cancelamento/e110111_v1.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do evento do cancelamento 1101111 7 | 8 | 9 | 10 | 11 | 12 | Descrição do Evento - “Cancelamento” 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Número do Protocolo de Status da NF-e. 1 posição (1 – Secretaria de Fazenda Estadual 2 – Receita Federal); 2 posições ano; 10 seqüencial no ano. 24 | 25 | 26 | 27 | 28 | Justificativa do cancelamento 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/cancelamento/envEventoCancNFe_v1.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do lote de envio do evento cancelamento 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/cancelamento/eventoCancNFe_v1.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do evento Cancelamento 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/cancelamento/procEventoCancNFe_v1.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do proc Cancelamento 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/cancelamento/retEnvEventoCancNFe_v1.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de Retorno da envio do Evento Cancelamento 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/cancelamento/version.txt: -------------------------------------------------------------------------------- 1 | Link: Esquemas XML NF-e / NFC-e - Evento Cancelamento (Atualizado em 21/12/2018) (ZIP) 2 | Baixado em: 09/03/2021 15:56 3 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/consReciNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do Pedido de Consulta do Recido do Lote de Notas Fiscais Eletrônicas 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/consSitNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema de validação XML dp Pedido de Consulta da Situação Atual da Nota Fiscal Eletrônica 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/consStatServ_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do Pedido de Consulta do Status do Serviço 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/enviNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do Pedido de Concessão de Autorização da Nota Fiscal Eletrônica 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/inutNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do Pedido de Inutilização de Numeração da Nota Fiscal Eletrônica 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/nfe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Nota Fiscal Eletrônica 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/procInutNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Pedido de inutilização de númeração de NF-e processado 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/procNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | NF-e processada 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/retConsReciNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do retorno do Pedido de Consulta do Recido do Lote de Notas Fiscais Eletrônicas 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/retConsSitNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do retorno da consulta da situação atual da NF-e 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/retConsStatServ_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do Resultado da Consulta do Status do Serviço 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/retEnviNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do retorno do Pedido de Concessão de Autorização da Nota Fiscal Eletrônica 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/retInutNFe_v4.00.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Schema XML de validação do retorno do Pedido de Inutilização de Numeração da Nota Fiscal Eletrônica 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/NFe/Core/schema/version.txt: -------------------------------------------------------------------------------- 1 | Link: Esquemas XML NF-e/NFC-e - Pacote de Liberação nº 9i (Novo leiaute da NF-e, NT 2021.004 v.1.00d). Publicado em 17/05/22 2 | Baixado em: 20/12/2022 14:40 3 | -------------------------------------------------------------------------------- /src/NFe/Database/data/IBPT/.json: -------------------------------------------------------------------------------- 1 | {"info":{"fonte":null,"versao":null,"chave":null,"vigencia":{"inicio":false,"fim":false}},"estados":{"":[]}} -------------------------------------------------------------------------------- /src/NFe/Database/data/uf_ibge_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "estados": { 3 | "RO": 11, 4 | "AC": 12, 5 | "AM": 13, 6 | "RR": 14, 7 | "PA": 15, 8 | "AP": 16, 9 | "TO": 17, 10 | "MA": 21, 11 | "PI": 22, 12 | "CE": 23, 13 | "RN": 24, 14 | "PB": 25, 15 | "PE": 26, 16 | "AL": 27, 17 | "SE": 28, 18 | "BA": 29, 19 | "MG": 31, 20 | "ES": 32, 21 | "RJ": 33, 22 | "SP": 35, 23 | "PR": 41, 24 | "SC": 42, 25 | "RS": 43, 26 | "MS": 50, 27 | "MT": 51, 28 | "GO": 52, 29 | "DF": 53 30 | }, 31 | "orgaos": { 32 | "RO": 11, 33 | "AC": 12, 34 | "AM": 13, 35 | "RR": 14, 36 | "PA": 15, 37 | "AP": 16, 38 | "TO": 17, 39 | "MA": 21, 40 | "PI": 22, 41 | "CE": 23, 42 | "RN": 24, 43 | "PB": 25, 44 | "PE": 26, 45 | "AL": 27, 46 | "SE": 28, 47 | "BA": 29, 48 | "MG": 31, 49 | "ES": 32, 50 | "RJ": 33, 51 | "SP": 35, 52 | "PR": 41, 53 | "SC": 42, 54 | "RS": 43, 55 | "MS": 50, 56 | "MT": 51, 57 | "GO": 52, 58 | "DF": 53, 59 | "AN": 91 60 | } 61 | } -------------------------------------------------------------------------------- /src/NFe/Exception/IncompleteRequestException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in all 18 | * copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | * 28 | */ 29 | 30 | namespace NFe\Exception; 31 | 32 | class IncompleteRequestException extends NetworkException 33 | { 34 | } 35 | -------------------------------------------------------------------------------- /src/NFe/Exception/NetworkException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in all 18 | * copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | * 28 | */ 29 | 30 | namespace NFe\Exception; 31 | 32 | class NetworkException extends \Exception 33 | { 34 | } 35 | -------------------------------------------------------------------------------- /src/NFe/Exception/ValidationException.php: -------------------------------------------------------------------------------- 1 | 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in all 18 | * copies or substantial portions of the Software. 19 | * 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | * 28 | */ 29 | 30 | namespace NFe\Exception; 31 | 32 | class ValidationException extends \Exception 33 | { 34 | private $errors = []; 35 | 36 | public function __construct($errors = []) 37 | { 38 | $this->errors = $errors; 39 | reset($errors); 40 | parent::__construct(current($errors)); 41 | } 42 | 43 | public function getErrors() 44 | { 45 | return $this->errors; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/NFe/Common/CertificadoTest.php: -------------------------------------------------------------------------------- 1 | setArquivoChavePublica($root . '/storage/certs/public.pem'); 12 | $certificado->setArquivoChavePrivada($root . '/storage/certs/private.pem'); 13 | $certificado->carrega($root . '/docs/certs/certificado.pfx', 'associacao', true); 14 | $this->assertEquals('2010-10-02', date('Y-m-d', $certificado->getExpiracao())); 15 | } 16 | 17 | public function testCarregaFalhaAbrir() 18 | { 19 | $certificado = new Certificado(); 20 | $this->expectException('\Exception'); 21 | $certificado->carrega('invalido.pfx', 'invalido'); 22 | } 23 | 24 | public function testCarregaFalhaLeitura() 25 | { 26 | $root = dirname(dirname(dirname(__DIR__))); 27 | $certificado = new Certificado(); 28 | $this->expectException('\Exception'); 29 | $certificado->carrega($root . '/docs/certs/certificado.pfx', 'invalido'); 30 | } 31 | 32 | public function testDataExpiracao() 33 | { 34 | $certificado = new Certificado(['chave_publica' => '0', 'chave_privada' => '0']); 35 | $certificado->setArquivoChavePublica(dirname(dirname(__DIR__)) . '/resources/certs/public.pem'); 36 | $certificado->setArquivoChavePrivada(dirname(dirname(__DIR__)) . '/resources/certs/private.pem'); 37 | $certificado->fromArray($certificado); 38 | $certificado->fromArray(null); 39 | $this->assertEquals('2010-10-02', date('Y-m-d', $certificado->getExpiracao())); 40 | $this->expectException('\Exception'); 41 | $certificado->requerValido(); 42 | } 43 | 44 | public function testNode() 45 | { 46 | $certificado = new Certificado(); 47 | try { 48 | $this->assertNull($certificado->getExpiracao()); 49 | $certificado->requerValido(); 50 | $this->fail('Exceção não lançada na função requerValido'); 51 | } catch (\Exception $e) { 52 | } 53 | try { 54 | $certificado->getNode(); 55 | $this->fail('Exceção não lançada na função getNode'); 56 | } catch (\Exception $e) { 57 | } 58 | $this->expectException('\Exception'); 59 | $certificado->loadNode(null); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /tests/NFe/Common/ConfiguracaoTest.php: -------------------------------------------------------------------------------- 1 | config = \NFe\Core\SEFAZ::getInstance(true)->getConfiguracao(); 13 | } 14 | 15 | public function testObjetos() 16 | { 17 | $config = new Configuracao(); 18 | $config->setToken('001'); 19 | $config->setCSC('654af489d23b81484c8'); 20 | $config->setTokenIBPT('a1a2a3'); 21 | $new_config = new Configuracao(); 22 | $new_config->fromArray($config); 23 | $new_config->fromArray($new_config->toArray()); 24 | $new_config->fromArray(null); 25 | $this->assertNotNull($this->config); 26 | $this->config->fromArray($this->config); 27 | $this->config->fromArray($this->config->toArray()); 28 | $this->config->fromArray(null); 29 | $banco = $this->config->getBanco(); 30 | $this->assertNotNull($banco); 31 | $banco->fromArray($banco); 32 | $banco->fromArray($banco->toArray()); 33 | $banco->fromArray(null); 34 | $emitente = $this->config->getEmitente(); 35 | $this->assertNotNull($emitente); 36 | } 37 | 38 | public function testFields() 39 | { 40 | $this->config->setSincrono(false); 41 | $this->assertEquals('N', $this->config->getSincrono()); 42 | $this->assertEquals('0', $this->config->getSincrono(true)); 43 | $this->config->setSincrono(true); 44 | $this->assertEquals('Y', $this->config->getSincrono()); 45 | $this->assertEquals('1', $this->config->getSincrono(true)); 46 | $time = date('c'); 47 | $this->config->setOffline($time); 48 | $this->assertEquals(Util::toDateTime(strtotime($time)), $this->config->getOffline(true)); 49 | $this->config->setOffline(null); 50 | } 51 | 52 | public function testDataExpiracao() 53 | { 54 | $this->config 55 | ->getCertificado() 56 | ->setArquivoChavePublica(dirname(dirname(__DIR__)) . '/resources/certs/public.pem') 57 | ->setArquivoChavePrivada(dirname(dirname(__DIR__)) . '/resources/certs/private.pem'); 58 | $this->config->getCertificado() 59 | ->setChavePublica($this->config->getCertificado()->getChavePublica()) 60 | ->setChavePrivada($this->config->getCertificado()->getChavePrivada()); 61 | $this->assertEquals('2010-10-02', date('Y-m-d', $this->config->getCertificado()->getExpiracao())); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/NFe/Database/IBPTTest.php: -------------------------------------------------------------------------------- 1 | ibpt = new \NFe\Database\IBPT(); 14 | Log::getInstance()->setHandler(new \Monolog\Handler\NullHandler()); 15 | } 16 | 17 | protected function tearDown(): void 18 | { 19 | Log::getInstance()->setHandler(null); 20 | } 21 | 22 | public function testAliquota() 23 | { 24 | $data = $this->ibpt->getImposto(null, null, '22021000', 'PR', 0); 25 | $this->assertArrayHasKey('importado', $data); 26 | $this->assertArrayHasKey('nacional', $data); 27 | $this->assertArrayHasKey('estadual', $data); 28 | $this->assertArrayHasKey('municipal', $data); 29 | $this->assertArrayHasKey('tipo', $data); 30 | $this->assertArrayHasKey('info', $data); 31 | $this->assertArrayHasKey('fonte', $data['info']); 32 | $this->assertArrayHasKey('versao', $data['info']); 33 | $this->assertArrayHasKey('chave', $data['info']); 34 | $this->assertArrayHasKey('vigencia', $data['info']); 35 | $this->assertArrayHasKey('inicio', $data['info']['vigencia']); 36 | $this->assertArrayHasKey('fim', $data['info']['vigencia']); 37 | $this->assertArrayHasKey('origem', $data['info']); 38 | 39 | // TODO: Testar com dados de ambiente de testes 40 | $data = $this->ibpt->getImposto('00000000000000', '', '22021000', 'PR', 0); 41 | $this->assertArrayHasKey('importado', $data); 42 | $this->assertArrayHasKey('nacional', $data); 43 | $this->assertArrayHasKey('estadual', $data); 44 | $this->assertArrayHasKey('municipal', $data); 45 | $this->assertArrayHasKey('tipo', $data); 46 | $this->assertArrayHasKey('info', $data); 47 | $this->assertArrayHasKey('fonte', $data['info']); 48 | $this->assertArrayHasKey('versao', $data['info']); 49 | $this->assertArrayHasKey('chave', $data['info']); 50 | $this->assertArrayHasKey('vigencia', $data['info']); 51 | $this->assertArrayHasKey('inicio', $data['info']['vigencia']); 52 | $this->assertArrayHasKey('fim', $data['info']['vigencia']); 53 | $this->assertArrayHasKey('origem', $data['info']); 54 | // offline 55 | $data = $this->ibpt->getImposto('00000000000000', '', '22021000', 'PR', 0); 56 | 57 | $data = $this->ibpt->getImposto(null, null, '22021000', 'ZZ', 0); 58 | $this->assertFalse($data); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/NFe/Entity/EstadoTest.php: -------------------------------------------------------------------------------- 1 | sefaz = \NFe\Core\SEFAZ::getInstance(true); 12 | } 13 | 14 | public function testEstado() 15 | { 16 | $estado = new \NFe\Entity\Estado(); 17 | $estado->setNome('Paraná'); 18 | $estado->setUF('PR'); 19 | $estado->checkCodigos(); 20 | $estado->fromArray($estado); 21 | $estado->fromArray($estado->toArray()); 22 | $estado->fromArray(null); 23 | 24 | $this->assertEquals(41, $estado->getCodigo()); 25 | $this->assertEquals('Paraná', $estado->getNome()); 26 | $this->assertEquals('Paraná', $estado->getNome(true)); 27 | $this->assertEquals('PR', $estado->getUF()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/COFINS/AliquotaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testAliquotaXML() 15 | { 16 | $cofins_aliquota = new \NFe\Entity\Imposto\COFINS\Aliquota(); 17 | $cofins_aliquota->setTributacao(\NFe\Entity\Imposto\COFINS\Aliquota::TRIBUTACAO_NORMAL); 18 | $cofins_aliquota->setBase(883.12); 19 | $cofins_aliquota->setAliquota(7.60); 20 | $cofins_aliquota->fromArray($cofins_aliquota); 21 | $cofins_aliquota->fromArray($cofins_aliquota->toArray()); 22 | $cofins_aliquota->fromArray(null); 23 | 24 | $xml = $cofins_aliquota->getNode(); 25 | $dom = $xml->ownerDocument; 26 | 27 | if (getenv('TEST_MODE') == 'override') { 28 | $dom->formatOutput = true; 29 | file_put_contents( 30 | $this->resource_path . '/xml/imposto/cofins/testAliquotaXML.xml', 31 | $dom->saveXML($xml) 32 | ); 33 | } 34 | 35 | $dom_cmp = new \DOMDocument(); 36 | $dom_cmp->preserveWhiteSpace = false; 37 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testAliquotaXML.xml'); 38 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 39 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 40 | } 41 | 42 | public function testAliquotaLoadXML() 43 | { 44 | $dom_cmp = new \DOMDocument(); 45 | $dom_cmp->preserveWhiteSpace = false; 46 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testAliquotaXML.xml'); 47 | 48 | $cofins_aliquota = new \NFe\Entity\Imposto\COFINS\Aliquota(); 49 | $cofins_aliquota->loadNode($dom_cmp->documentElement); 50 | 51 | $xml = $cofins_aliquota->getNode(); 52 | $dom = $xml->ownerDocument; 53 | 54 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 55 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/COFINS/GenericoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testGenericoXML() 15 | { 16 | $cofins_generico = new Generico(); 17 | $cofins_generico->setValor(3.50); 18 | $cofins_generico->fromArray($cofins_generico); 19 | $cofins_generico->fromArray($cofins_generico->toArray()); 20 | $cofins_generico->fromArray(null); 21 | 22 | $xml = $cofins_generico->getNode(); 23 | $dom = $xml->ownerDocument; 24 | 25 | if (getenv('TEST_MODE') == 'override') { 26 | $dom->formatOutput = true; 27 | file_put_contents( 28 | $this->resource_path . '/xml/imposto/cofins/testGenericoXML.xml', 29 | $dom->saveXML($xml) 30 | ); 31 | } 32 | 33 | $dom_cmp = new \DOMDocument(); 34 | $dom_cmp->preserveWhiteSpace = false; 35 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testGenericoXML.xml'); 36 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 37 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 38 | } 39 | 40 | public function testGenericoLoadXML() 41 | { 42 | $dom_cmp = new \DOMDocument(); 43 | $dom_cmp->preserveWhiteSpace = false; 44 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testGenericoXML.xml'); 45 | 46 | $cofins_generico = Generico::loadImposto($dom_cmp->documentElement); 47 | $this->assertInstanceOf(Generico::class, $cofins_generico); 48 | 49 | $xml = $cofins_generico->getNode(); 50 | $dom = $xml->ownerDocument; 51 | 52 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 53 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/COFINS/IsentoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testIsentoXML() 15 | { 16 | $cofins_isento = new Isento(); 17 | $cofins_isento->setTributacao(Isento::TRIBUTACAO_MONOFASICA); 18 | $cofins_isento->fromArray($cofins_isento); 19 | $cofins_isento->fromArray($cofins_isento->toArray()); 20 | $cofins_isento->fromArray(null); 21 | 22 | $xml = $cofins_isento->getNode(); 23 | $dom = $xml->ownerDocument; 24 | 25 | if (getenv('TEST_MODE') == 'override') { 26 | $dom->formatOutput = true; 27 | file_put_contents( 28 | $this->resource_path . '/xml/imposto/cofins/testIsentoXML.xml', 29 | $dom->saveXML($xml) 30 | ); 31 | } 32 | 33 | $dom_cmp = new \DOMDocument(); 34 | $dom_cmp->preserveWhiteSpace = false; 35 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testIsentoXML.xml'); 36 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 37 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 38 | } 39 | 40 | public function testIsentoLoadXML() 41 | { 42 | $dom_cmp = new \DOMDocument(); 43 | $dom_cmp->preserveWhiteSpace = false; 44 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testIsentoXML.xml'); 45 | 46 | $cofins_isento = Isento::loadImposto($dom_cmp->documentElement); 47 | $this->assertInstanceOf(Isento::class, $cofins_isento); 48 | 49 | $xml = $cofins_isento->getNode(); 50 | $dom = $xml->ownerDocument; 51 | 52 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 53 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/COFINS/QuantidadeTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testQuantidadeXML() 15 | { 16 | $cofins_quantidade = new Quantidade(); 17 | $cofins_quantidade->setQuantidade(1000); 18 | $cofins_quantidade->setAliquota(0.0076); 19 | $cofins_quantidade->fromArray($cofins_quantidade); 20 | $cofins_quantidade->fromArray($cofins_quantidade->toArray()); 21 | $cofins_quantidade->fromArray(null); 22 | 23 | $xml = $cofins_quantidade->getNode(); 24 | $dom = $xml->ownerDocument; 25 | 26 | if (getenv('TEST_MODE') == 'override') { 27 | $dom->formatOutput = true; 28 | file_put_contents( 29 | $this->resource_path . '/xml/imposto/cofins/testQuantidadeXML.xml', 30 | $dom->saveXML($xml) 31 | ); 32 | } 33 | 34 | $dom_cmp = new \DOMDocument(); 35 | $dom_cmp->preserveWhiteSpace = false; 36 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testQuantidadeXML.xml'); 37 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 38 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 39 | } 40 | 41 | public function testQuantidadeLoadXML() 42 | { 43 | $dom_cmp = new \DOMDocument(); 44 | $dom_cmp->preserveWhiteSpace = false; 45 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/testQuantidadeXML.xml'); 46 | 47 | $cofins_quantidade = Quantidade::loadImposto($dom_cmp->documentElement); 48 | $this->assertInstanceOf(Quantidade::class, $cofins_quantidade); 49 | 50 | $xml = $cofins_quantidade->getNode(); 51 | $dom = $xml->ownerDocument; 52 | 53 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 54 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/COFINS/ST/AliquotaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testAliquotaXML() 15 | { 16 | $cofins_aliquota = new Aliquota(); 17 | $cofins_aliquota->setTributacao(Aliquota::TRIBUTACAO_NORMAL); 18 | $cofins_aliquota->setBase(100.00); 19 | $cofins_aliquota->setAliquota(3.00); 20 | $cofins_aliquota->fromArray($cofins_aliquota); 21 | $cofins_aliquota->fromArray($cofins_aliquota->toArray()); 22 | $cofins_aliquota->fromArray(null); 23 | 24 | $xml = $cofins_aliquota->getNode(); 25 | $dom = $xml->ownerDocument; 26 | 27 | if (getenv('TEST_MODE') == 'override') { 28 | $dom->formatOutput = true; 29 | file_put_contents( 30 | $this->resource_path . '/xml/imposto/cofins/st/testAliquotaXML.xml', 31 | $dom->saveXML($xml) 32 | ); 33 | } 34 | 35 | $dom_cmp = new \DOMDocument(); 36 | $dom_cmp->preserveWhiteSpace = false; 37 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/st/testAliquotaXML.xml'); 38 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 39 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 40 | } 41 | 42 | public function testAliquotaLoadXML() 43 | { 44 | $dom_cmp = new \DOMDocument(); 45 | $dom_cmp->preserveWhiteSpace = false; 46 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/st/testAliquotaXML.xml'); 47 | 48 | $cofins_aliquota = Aliquota::loadImposto($dom_cmp->documentElement); 49 | $this->assertInstanceOf(Aliquota::class, $cofins_aliquota); 50 | 51 | $xml = $cofins_aliquota->getNode(); 52 | $dom = $xml->ownerDocument; 53 | 54 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 55 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/COFINS/ST/QuantidadeTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testQuantidadeXML() 15 | { 16 | $cofins_quantidade = new Quantidade(); 17 | $cofins_quantidade->setQuantidade(1000); 18 | $cofins_quantidade->setAliquota(0.0076); 19 | $cofins_quantidade->fromArray($cofins_quantidade); 20 | $cofins_quantidade->fromArray($cofins_quantidade->toArray()); 21 | $cofins_quantidade->fromArray(null); 22 | 23 | $xml = $cofins_quantidade->getNode(); 24 | $dom = $xml->ownerDocument; 25 | 26 | if (getenv('TEST_MODE') == 'override') { 27 | $dom->formatOutput = true; 28 | file_put_contents( 29 | $this->resource_path . '/xml/imposto/cofins/st/testQuantidadeXML.xml', 30 | $dom->saveXML($xml) 31 | ); 32 | } 33 | 34 | $dom_cmp = new \DOMDocument(); 35 | $dom_cmp->preserveWhiteSpace = false; 36 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/st/testQuantidadeXML.xml'); 37 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 38 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 39 | } 40 | 41 | public function testQuantidadeLoadXML() 42 | { 43 | $dom_cmp = new \DOMDocument(); 44 | $dom_cmp->preserveWhiteSpace = false; 45 | $dom_cmp->load($this->resource_path . '/xml/imposto/cofins/st/testQuantidadeXML.xml'); 46 | 47 | $cofins_quantidade = Quantidade::loadImposto($dom_cmp->documentElement); 48 | $this->assertInstanceOf(Quantidade::class, $cofins_quantidade); 49 | 50 | $xml = $cofins_quantidade->getNode(); 51 | $dom = $xml->ownerDocument; 52 | 53 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 54 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/CobrancaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testCobrancaXML() 15 | { 16 | $icms_cobranca = new Cobranca(); 17 | $icms_cobranca->getNormal()->setModalidade(\NFe\Entity\Imposto\ICMS\Normal::MODALIDADE_OPERACAO); 18 | $icms_cobranca->getNormal()->setBase(100.00); 19 | $icms_cobranca->getNormal()->setAliquota(18.00); 20 | $icms_cobranca->setModalidade(\NFe\Entity\Imposto\ICMS\Parcial::MODALIDADE_AGREGADO); 21 | $icms_cobranca->setBase(135.00); 22 | $icms_cobranca->setMargem(50.00); 23 | $icms_cobranca->setReducao(10.00); 24 | $icms_cobranca->setAliquota(18.00); 25 | $icms_cobranca->fromArray($icms_cobranca); 26 | $icms_cobranca->fromArray($icms_cobranca->toArray()); 27 | $icms_cobranca->fromArray(null); 28 | 29 | $xml = $icms_cobranca->getNode(); 30 | $dom = $xml->ownerDocument; 31 | 32 | if (getenv('TEST_MODE') == 'override') { 33 | $dom->formatOutput = true; 34 | file_put_contents( 35 | $this->resource_path . '/xml/imposto/icms/testCobrancaXML.xml', 36 | $dom->saveXML($xml) 37 | ); 38 | } 39 | 40 | $dom_cmp = new \DOMDocument(); 41 | $dom_cmp->preserveWhiteSpace = false; 42 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testCobrancaXML.xml'); 43 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 44 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 45 | } 46 | 47 | public function testCobrancaLoadXML() 48 | { 49 | $dom_cmp = new \DOMDocument(); 50 | $dom_cmp->preserveWhiteSpace = false; 51 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testCobrancaXML.xml'); 52 | 53 | $icms_cobranca = Cobranca::loadImposto($dom_cmp->documentElement); 54 | $this->assertInstanceOf(Cobranca::class, $icms_cobranca); 55 | 56 | $xml = $icms_cobranca->getNode(); 57 | $dom = $xml->ownerDocument; 58 | 59 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 60 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/MistaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testMistaXML() 15 | { 16 | $icms_mista = new Mista(); 17 | $icms_mista->getNormal()->setModalidade(Normal::MODALIDADE_OPERACAO); 18 | $icms_mista->getNormal()->setBase(90.00); 19 | $icms_mista->getNormal()->setReducao(10.00); 20 | $icms_mista->getNormal()->setAliquota(18.00); 21 | 22 | $icms_mista->setModalidade(Parcial::MODALIDADE_AGREGADO); 23 | $icms_mista->setBase(162.00); 24 | $icms_mista->setMargem(100.00); 25 | $icms_mista->setReducao(10.00); 26 | $icms_mista->setAliquota(18.00); 27 | $icms_mista->fromArray($icms_mista); 28 | $icms_mista->fromArray($icms_mista->toArray()); 29 | $icms_mista->fromArray(null); 30 | 31 | $xml = $icms_mista->getNode(); 32 | $dom = $xml->ownerDocument; 33 | 34 | if (getenv('TEST_MODE') == 'override') { 35 | $dom->formatOutput = true; 36 | file_put_contents( 37 | $this->resource_path . '/xml/imposto/icms/testMistaXML.xml', 38 | $dom->saveXML($xml) 39 | ); 40 | } 41 | 42 | $dom_cmp = new \DOMDocument(); 43 | $dom_cmp->preserveWhiteSpace = false; 44 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testMistaXML.xml'); 45 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 46 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 47 | } 48 | 49 | public function testMistaLoadXML() 50 | { 51 | $dom_cmp = new \DOMDocument(); 52 | $dom_cmp->preserveWhiteSpace = false; 53 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testMistaXML.xml'); 54 | 55 | $icms_mista = Mista::loadImposto($dom_cmp->documentElement); 56 | $this->assertInstanceOf(Mista::class, $icms_mista); 57 | 58 | $xml = $icms_mista->getNode(); 59 | $dom = $xml->ownerDocument; 60 | 61 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 62 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/PartilhaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testPartilhaXML() 15 | { 16 | $icms_partilha = new Partilha(); 17 | $icms_partilha->getNormal()->setModalidade(Normal::MODALIDADE_OPERACAO); 18 | $icms_partilha->getNormal()->setBase(90.00); 19 | $icms_partilha->getNormal()->setReducao(10.00); 20 | $icms_partilha->getNormal()->setAliquota(18.00); 21 | 22 | $icms_partilha->setModalidade(Parcial::MODALIDADE_AGREGADO); 23 | $icms_partilha->setBase(162.00); 24 | $icms_partilha->setMargem(100.00); 25 | $icms_partilha->setReducao(10.00); 26 | $icms_partilha->setAliquota(18.00); 27 | $icms_partilha->setOperacao(5.70); 28 | $icms_partilha->setUF('PR'); 29 | $icms_partilha->fromArray($icms_partilha); 30 | $icms_partilha->fromArray($icms_partilha->toArray()); 31 | $icms_partilha->fromArray(null); 32 | 33 | $xml = $icms_partilha->getNode(); 34 | $dom = $xml->ownerDocument; 35 | 36 | if (getenv('TEST_MODE') == 'override') { 37 | $dom->formatOutput = true; 38 | file_put_contents( 39 | $this->resource_path . '/xml/imposto/icms/testPartilhaXML.xml', 40 | $dom->saveXML($xml) 41 | ); 42 | } 43 | 44 | $dom_cmp = new \DOMDocument(); 45 | $dom_cmp->preserveWhiteSpace = false; 46 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testPartilhaXML.xml'); 47 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 48 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 49 | } 50 | 51 | public function testPartilhaLoadXML() 52 | { 53 | $dom_cmp = new \DOMDocument(); 54 | $dom_cmp->preserveWhiteSpace = false; 55 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testPartilhaXML.xml'); 56 | 57 | $icms_partilha = Partilha::loadImposto($dom_cmp->documentElement); 58 | $this->assertInstanceOf(Partilha::class, $icms_partilha); 59 | 60 | $xml = $icms_partilha->getNode(); 61 | $dom = $xml->ownerDocument; 62 | 63 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 64 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/ReducaoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testReducaoXML() 15 | { 16 | $icms_reducao = new Reducao(); 17 | $icms_reducao->setModalidade(Normal::MODALIDADE_OPERACAO); 18 | $icms_reducao->setBase(90.00); 19 | $icms_reducao->setAliquota(18.0); 20 | $icms_reducao->setReducao(10.0); 21 | $icms_reducao->fromArray($icms_reducao); 22 | $icms_reducao->fromArray($icms_reducao->toArray()); 23 | $icms_reducao->fromArray(null); 24 | 25 | $xml = $icms_reducao->getNode(); 26 | $dom = $xml->ownerDocument; 27 | 28 | if (getenv('TEST_MODE') == 'override') { 29 | $dom->formatOutput = true; 30 | file_put_contents( 31 | $this->resource_path . '/xml/imposto/icms/testReducaoXML.xml', 32 | $dom->saveXML($xml) 33 | ); 34 | } 35 | 36 | $dom_cmp = new \DOMDocument(); 37 | $dom_cmp->preserveWhiteSpace = false; 38 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testReducaoXML.xml'); 39 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 40 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 41 | } 42 | 43 | public function testReducaoLoadXML() 44 | { 45 | $dom_cmp = new \DOMDocument(); 46 | $dom_cmp->preserveWhiteSpace = false; 47 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testReducaoXML.xml'); 48 | 49 | $icms_reducao = Reducao::loadImposto($dom_cmp->documentElement); 50 | $this->assertInstanceOf(Reducao::class, $icms_reducao); 51 | 52 | $xml = $icms_reducao->getNode(); 53 | $dom = $xml->ownerDocument; 54 | 55 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 56 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/Simples/CobrancaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testCobrancaXML() 15 | { 16 | // TODO: verificar vICMSST = 12.96 17 | $icms_cobranca = new Cobranca(); 18 | $icms_cobranca->getNormal()->setModalidade(\NFe\Entity\Imposto\ICMS\Normal::MODALIDADE_OPERACAO); 19 | $icms_cobranca->getNormal()->setBase(1036.80); 20 | $icms_cobranca->getNormal()->setAliquota(1.25); 21 | $icms_cobranca->setModalidade(\NFe\Entity\Imposto\ICMS\Parcial::MODALIDADE_AGREGADO); 22 | $icms_cobranca->setBase(162.00); 23 | $icms_cobranca->setMargem(100.00); 24 | $icms_cobranca->setReducao(10.00); 25 | $icms_cobranca->setAliquota(18.00); 26 | $icms_cobranca->fromArray($icms_cobranca); 27 | $icms_cobranca->fromArray($icms_cobranca->toArray()); 28 | $icms_cobranca->fromArray(null); 29 | 30 | $xml = $icms_cobranca->getNode(); 31 | $dom = $xml->ownerDocument; 32 | 33 | if (getenv('TEST_MODE') == 'override') { 34 | $dom->formatOutput = true; 35 | file_put_contents( 36 | $this->resource_path . '/xml/imposto/icms/simples/testCobrancaXML.xml', 37 | $dom->saveXML($xml) 38 | ); 39 | } 40 | 41 | $dom_cmp = new \DOMDocument(); 42 | $dom_cmp->preserveWhiteSpace = false; 43 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testCobrancaXML.xml'); 44 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 45 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 46 | } 47 | 48 | public function testCobrancaLoadXML() 49 | { 50 | $dom_cmp = new \DOMDocument(); 51 | $dom_cmp->preserveWhiteSpace = false; 52 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testCobrancaXML.xml'); 53 | 54 | $icms_cobranca = Cobranca::loadImposto($dom_cmp->documentElement); 55 | $this->assertInstanceOf(Cobranca::class, $icms_cobranca); 56 | 57 | $xml = $icms_cobranca->getNode(); 58 | $dom = $xml->ownerDocument; 59 | 60 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 61 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/Simples/GenericoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testGenericoXML() 15 | { 16 | $icms_generico = new Generico(); 17 | $icms_generico->fromArray($icms_generico); 18 | $icms_generico->fromArray($icms_generico->toArray()); 19 | $icms_generico->fromArray(null); 20 | 21 | $xml = $icms_generico->getNode(); 22 | $dom = $xml->ownerDocument; 23 | 24 | if (getenv('TEST_MODE') == 'override') { 25 | $dom->formatOutput = true; 26 | file_put_contents( 27 | $this->resource_path . '/xml/imposto/icms/simples/testGenericoXML.xml', 28 | $dom->saveXML($xml) 29 | ); 30 | } 31 | 32 | $dom_cmp = new \DOMDocument(); 33 | $dom_cmp->preserveWhiteSpace = false; 34 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testGenericoXML.xml'); 35 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 36 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 37 | } 38 | 39 | public function testGenericoLoadXML() 40 | { 41 | $dom_cmp = new \DOMDocument(); 42 | $dom_cmp->preserveWhiteSpace = false; 43 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testGenericoXML.xml'); 44 | 45 | $icms_generico = Generico::loadImposto($dom_cmp->documentElement); 46 | $this->assertInstanceOf(Generico::class, $icms_generico); 47 | 48 | $xml = $icms_generico->getNode(); 49 | $dom = $xml->ownerDocument; 50 | 51 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 52 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/Simples/IsentoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testIsentoXML() 15 | { 16 | $icms_isento = new Isento(); 17 | $icms_isento->fromArray($icms_isento); 18 | $icms_isento->fromArray($icms_isento->toArray()); 19 | $icms_isento->fromArray(null); 20 | 21 | $xml = $icms_isento->getNode(); 22 | $dom = $xml->ownerDocument; 23 | 24 | if (getenv('TEST_MODE') == 'override') { 25 | $dom->formatOutput = true; 26 | file_put_contents( 27 | $this->resource_path . '/xml/imposto/icms/simples/testIsentoXML.xml', 28 | $dom->saveXML($xml) 29 | ); 30 | } 31 | 32 | $dom_cmp = new \DOMDocument(); 33 | $dom_cmp->preserveWhiteSpace = false; 34 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testIsentoXML.xml'); 35 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 36 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 37 | } 38 | 39 | public function testIsentoLoadXML() 40 | { 41 | $dom_cmp = new \DOMDocument(); 42 | $dom_cmp->preserveWhiteSpace = false; 43 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testIsentoXML.xml'); 44 | 45 | $icms_isento = Isento::loadImposto($dom_cmp->documentElement); 46 | $this->assertInstanceOf(Isento::class, $icms_isento); 47 | 48 | $xml = $icms_isento->getNode(); 49 | $dom = $xml->ownerDocument; 50 | 51 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 52 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/Simples/NormalTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testNormalXML() 15 | { 16 | $icms_simples_normal = new Normal(); 17 | $icms_simples_normal->setBase(1036.80); 18 | $icms_simples_normal->setAliquota(1.25); 19 | $icms_simples_normal->fromArray($icms_simples_normal); 20 | $icms_simples_normal->fromArray($icms_simples_normal->toArray()); 21 | $icms_simples_normal->fromArray(null); 22 | 23 | $xml = $icms_simples_normal->getNode(); 24 | $dom = $xml->ownerDocument; 25 | 26 | if (getenv('TEST_MODE') == 'override') { 27 | $dom->formatOutput = true; 28 | file_put_contents( 29 | $this->resource_path . '/xml/imposto/icms/simples/testNormalXML.xml', 30 | $dom->saveXML($xml) 31 | ); 32 | } 33 | 34 | $dom_cmp = new \DOMDocument(); 35 | $dom_cmp->preserveWhiteSpace = false; 36 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testNormalXML.xml'); 37 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 38 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 39 | } 40 | 41 | public function testNormalLoadXML() 42 | { 43 | $dom_cmp = new \DOMDocument(); 44 | $dom_cmp->preserveWhiteSpace = false; 45 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testNormalXML.xml'); 46 | 47 | $icms_simples_normal = Normal::loadImposto($dom_cmp->documentElement); 48 | $this->assertInstanceOf(Normal::class, $icms_simples_normal); 49 | 50 | $xml = $icms_simples_normal->getNode(); 51 | $dom = $xml->ownerDocument; 52 | 53 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 54 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/Simples/ParcialTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testParcialXML() 15 | { 16 | // TODO: verificar vICMSST = 12.96 17 | $icms_parcial = new Parcial(); 18 | $icms_parcial->setModalidade(Parcial::MODALIDADE_AGREGADO); 19 | $icms_parcial->setBase(162.00); 20 | $icms_parcial->setMargem(100.00); 21 | $icms_parcial->setReducao(10.00); 22 | $icms_parcial->setAliquota(18.00); 23 | $icms_parcial->fromArray($icms_parcial); 24 | $icms_parcial->fromArray($icms_parcial->toArray()); 25 | $icms_parcial->fromArray(null); 26 | 27 | $xml = $icms_parcial->getNode(); 28 | $dom = $xml->ownerDocument; 29 | 30 | if (getenv('TEST_MODE') == 'override') { 31 | $dom->formatOutput = true; 32 | file_put_contents( 33 | $this->resource_path . '/xml/imposto/icms/simples/testParcialXML.xml', 34 | $dom->saveXML($xml) 35 | ); 36 | } 37 | 38 | $dom_cmp = new \DOMDocument(); 39 | $dom_cmp->preserveWhiteSpace = false; 40 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testParcialXML.xml'); 41 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 42 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 43 | } 44 | 45 | public function testParcialLoadXML() 46 | { 47 | $dom_cmp = new \DOMDocument(); 48 | $dom_cmp->preserveWhiteSpace = false; 49 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/simples/testParcialXML.xml'); 50 | 51 | $icms_parcial = Parcial::loadImposto($dom_cmp->documentElement); 52 | $this->assertInstanceOf(Parcial::class, $icms_parcial); 53 | 54 | $xml = $icms_parcial->getNode(); 55 | $dom = $xml->ownerDocument; 56 | 57 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 58 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/ICMS/SubstitutoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testSubstitutoXML() 15 | { 16 | $icms_substituto = new Substituto(); 17 | $icms_substituto->getNormal()->setBase(135.00); 18 | $icms_substituto->getNormal()->setValor(24.30); 19 | 20 | $icms_substituto->setBase(135.00); 21 | $icms_substituto->setValor(24.30); 22 | $icms_substituto->fromArray($icms_substituto); 23 | $icms_substituto->fromArray($icms_substituto->toArray()); 24 | $icms_substituto->fromArray(null); 25 | 26 | $xml = $icms_substituto->getNode(); 27 | $dom = $xml->ownerDocument; 28 | 29 | if (getenv('TEST_MODE') == 'override') { 30 | $dom->formatOutput = true; 31 | file_put_contents( 32 | $this->resource_path . '/xml/imposto/icms/testSubstitutoXML.xml', 33 | $dom->saveXML($xml) 34 | ); 35 | } 36 | 37 | $dom_cmp = new \DOMDocument(); 38 | $dom_cmp->preserveWhiteSpace = false; 39 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testSubstitutoXML.xml'); 40 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 41 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 42 | } 43 | 44 | public function testSubstitutoLoadXML() 45 | { 46 | $dom_cmp = new \DOMDocument(); 47 | $dom_cmp->preserveWhiteSpace = false; 48 | $dom_cmp->load($this->resource_path . '/xml/imposto/icms/testSubstitutoXML.xml'); 49 | 50 | $icms_substituto = Substituto::loadImposto($dom_cmp->documentElement); 51 | $this->assertInstanceOf(Substituto::class, $icms_substituto); 52 | 53 | $xml = $icms_substituto->getNode(); 54 | $dom = $xml->ownerDocument; 55 | 56 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 57 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/IITest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(__DIR__))) . '/resources'; 12 | } 13 | 14 | public function testIIXML() 15 | { 16 | $ii = new II(); 17 | $ii->setBase(1000.00); 18 | $ii->setDespesas(150.00); 19 | $ii->setValor(100.00); 20 | $ii->setIOF(80.00); 21 | $ii->fromArray($ii); 22 | $ii->fromArray($ii->toArray()); 23 | $ii->fromArray(null); 24 | 25 | $xml = $ii->getNode(); 26 | $dom = $xml->ownerDocument; 27 | 28 | if (getenv('TEST_MODE') == 'override') { 29 | $dom->formatOutput = true; 30 | file_put_contents( 31 | $this->resource_path . '/xml/imposto/testIIXML.xml', 32 | $dom->saveXML($xml) 33 | ); 34 | } 35 | 36 | $dom_cmp = new \DOMDocument(); 37 | $dom_cmp->preserveWhiteSpace = false; 38 | $dom_cmp->load($this->resource_path . '/xml/imposto/testIIXML.xml'); 39 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 40 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 41 | } 42 | 43 | public function testIILoadXML() 44 | { 45 | $dom_cmp = new \DOMDocument(); 46 | $dom_cmp->preserveWhiteSpace = false; 47 | $dom_cmp->load($this->resource_path . '/xml/imposto/testIIXML.xml'); 48 | 49 | $ii = II::loadImposto($dom_cmp->documentElement); 50 | $this->assertInstanceOf(II::class, $ii); 51 | 52 | $xml = $ii->getNode(); 53 | $dom = $xml->ownerDocument; 54 | 55 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 56 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/IPI/AliquotaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testAliquotaXML() 15 | { 16 | // Exemplo para Alíquota ad valorem 17 | $ipi = new \NFe\Entity\Imposto\IPI(); 18 | $ipi_aliquota = new Aliquota(); 19 | $ipi_aliquota->setBase(1000.00); 20 | $ipi_aliquota->setAliquota(7.00); 21 | $ipi_aliquota->fromArray($ipi_aliquota); 22 | $ipi_aliquota->fromArray($ipi_aliquota->toArray()); 23 | $ipi_aliquota->fromArray(null); 24 | $ipi->setTributo($ipi_aliquota); 25 | $ipi->fromArray($ipi); 26 | $ipi->fromArray($ipi->toArray()); 27 | $ipi->fromArray(null); 28 | 29 | $xml = $ipi->getNode(); 30 | $dom = $xml->ownerDocument; 31 | 32 | if (getenv('TEST_MODE') == 'override') { 33 | $dom->formatOutput = true; 34 | file_put_contents( 35 | $this->resource_path . '/xml/imposto/ipi/testAliquotaXML.xml', 36 | $dom->saveXML($xml) 37 | ); 38 | } 39 | 40 | $dom_cmp = new \DOMDocument(); 41 | $dom_cmp->preserveWhiteSpace = false; 42 | $dom_cmp->load($this->resource_path . '/xml/imposto/ipi/testAliquotaXML.xml'); 43 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 44 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 45 | } 46 | 47 | public function testAliquotaLoadXML() 48 | { 49 | $dom_cmp = new \DOMDocument(); 50 | $dom_cmp->preserveWhiteSpace = false; 51 | $dom_cmp->load($this->resource_path . '/xml/imposto/ipi/testAliquotaXML.xml'); 52 | 53 | $ipi = \NFe\Entity\Imposto\IPI::loadImposto($dom_cmp->documentElement); 54 | $this->assertInstanceOf(\NFe\Entity\Imposto\IPI::class, $ipi); 55 | 56 | $xml = $ipi->getNode(); 57 | $dom = $xml->ownerDocument; 58 | 59 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 60 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/IPI/IsentoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testIsentoXML() 15 | { 16 | // Exemplo para operação Não Tributada (só utilize se for contribuinte do IPI) 17 | $ipi = new \NFe\Entity\Imposto\IPI(); 18 | $ipi_isento = new \NFe\Entity\Imposto\IPI\Isento(); 19 | $ipi_isento->fromArray($ipi_isento); 20 | $ipi_isento->fromArray($ipi_isento->toArray()); 21 | $ipi_isento->fromArray(null); 22 | $ipi->setTributo($ipi_isento); 23 | $ipi->fromArray($ipi); 24 | $ipi->fromArray($ipi->toArray()); 25 | $ipi->fromArray(null); 26 | 27 | $xml = $ipi->getNode(); 28 | $dom = $xml->ownerDocument; 29 | 30 | if (getenv('TEST_MODE') == 'override') { 31 | $dom->formatOutput = true; 32 | file_put_contents( 33 | $this->resource_path . '/xml/imposto/ipi/testIsentoXML.xml', 34 | $dom->saveXML($xml) 35 | ); 36 | } 37 | 38 | $dom_cmp = new \DOMDocument(); 39 | $dom_cmp->preserveWhiteSpace = false; 40 | $dom_cmp->load($this->resource_path . '/xml/imposto/ipi/testIsentoXML.xml'); 41 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 42 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 43 | } 44 | 45 | public function testIsentoLoadXML() 46 | { 47 | $dom_cmp = new \DOMDocument(); 48 | $dom_cmp->preserveWhiteSpace = false; 49 | $dom_cmp->load($this->resource_path . '/xml/imposto/ipi/testIsentoXML.xml'); 50 | 51 | $ipi = new \NFe\Entity\Imposto\IPI(); 52 | $ipi->loadNode($dom_cmp->documentElement); 53 | 54 | $xml = $ipi->getNode(); 55 | $dom = $xml->ownerDocument; 56 | 57 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 58 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/IPI/QuantidadeTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testQuantidadeXML() 15 | { 16 | // Exemplo para Alíquota específica 17 | $ipi = new \NFe\Entity\Imposto\IPI(); 18 | $ipi_quantidade = new \NFe\Entity\Imposto\IPI\Quantidade(); 19 | $ipi_quantidade->setQuantidade(1000.00); 20 | $ipi_quantidade->setPreco(0.7640); 21 | $ipi_quantidade->fromArray($ipi_quantidade); 22 | $ipi_quantidade->fromArray($ipi_quantidade->toArray()); 23 | $ipi_quantidade->fromArray(null); 24 | $ipi->setTributo($ipi_quantidade); 25 | $ipi->fromArray($ipi); 26 | $ipi->fromArray($ipi->toArray()); 27 | $ipi->fromArray(null); 28 | 29 | $xml = $ipi->getNode(); 30 | $dom = $xml->ownerDocument; 31 | 32 | if (getenv('TEST_MODE') == 'override') { 33 | $dom->formatOutput = true; 34 | file_put_contents( 35 | $this->resource_path . '/xml/imposto/ipi/testQuantidadeXML.xml', 36 | $dom->saveXML($xml) 37 | ); 38 | } 39 | 40 | $dom_cmp = new \DOMDocument(); 41 | $dom_cmp->preserveWhiteSpace = false; 42 | $dom_cmp->load($this->resource_path . '/xml/imposto/ipi/testQuantidadeXML.xml'); 43 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 44 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 45 | } 46 | 47 | public function testQuantidadeLoadXML() 48 | { 49 | $dom_cmp = new \DOMDocument(); 50 | $dom_cmp->preserveWhiteSpace = false; 51 | $dom_cmp->load($this->resource_path . '/xml/imposto/ipi/testQuantidadeXML.xml'); 52 | 53 | $ipi = new \NFe\Entity\Imposto\IPI(); 54 | $ipi->loadNode($dom_cmp->documentElement); 55 | 56 | $xml = $ipi->getNode(); 57 | $dom = $xml->ownerDocument; 58 | 59 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 60 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/PIS/AliquotaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testAliquotaXML() 15 | { 16 | $pis_aliquota = new \NFe\Entity\Imposto\PIS\Aliquota(); 17 | $pis_aliquota->setTributacao(\NFe\Entity\Imposto\PIS\Aliquota::TRIBUTACAO_NORMAL); 18 | $pis_aliquota->setBase(883.12); 19 | $pis_aliquota->setAliquota(1.65); 20 | $pis_aliquota->fromArray($pis_aliquota); 21 | $pis_aliquota->fromArray($pis_aliquota->toArray()); 22 | $pis_aliquota->fromArray(null); 23 | 24 | $xml = $pis_aliquota->getNode(); 25 | $dom = $xml->ownerDocument; 26 | 27 | if (getenv('TEST_MODE') == 'override') { 28 | $dom->formatOutput = true; 29 | file_put_contents( 30 | $this->resource_path . '/xml/imposto/pis/testAliquotaXML.xml', 31 | $dom->saveXML($xml) 32 | ); 33 | } 34 | 35 | $dom_cmp = new \DOMDocument(); 36 | $dom_cmp->preserveWhiteSpace = false; 37 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testAliquotaXML.xml'); 38 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 39 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 40 | } 41 | 42 | public function testAliquotaLoadXML() 43 | { 44 | $dom_cmp = new \DOMDocument(); 45 | $dom_cmp->preserveWhiteSpace = false; 46 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testAliquotaXML.xml'); 47 | 48 | $pis_aliquota = new \NFe\Entity\Imposto\PIS\Aliquota(); 49 | $pis_aliquota->loadNode($dom_cmp->documentElement); 50 | 51 | $xml = $pis_aliquota->getNode(); 52 | $dom = $xml->ownerDocument; 53 | 54 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 55 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/PIS/GenericoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testGenericoXML() 15 | { 16 | $pis_generico = new Generico(); 17 | $pis_generico->setValor(3.50); 18 | $pis_generico->fromArray($pis_generico); 19 | $pis_generico->fromArray($pis_generico->toArray()); 20 | $pis_generico->fromArray(null); 21 | 22 | $xml = $pis_generico->getNode(); 23 | $dom = $xml->ownerDocument; 24 | 25 | if (getenv('TEST_MODE') == 'override') { 26 | $dom->formatOutput = true; 27 | file_put_contents( 28 | $this->resource_path . '/xml/imposto/pis/testGenericoXML.xml', 29 | $dom->saveXML($xml) 30 | ); 31 | } 32 | 33 | $dom_cmp = new \DOMDocument(); 34 | $dom_cmp->preserveWhiteSpace = false; 35 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testGenericoXML.xml'); 36 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 37 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 38 | } 39 | 40 | public function testGenericoLoadXML() 41 | { 42 | $dom_cmp = new \DOMDocument(); 43 | $dom_cmp->preserveWhiteSpace = false; 44 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testGenericoXML.xml'); 45 | 46 | $pis_generico = Generico::loadImposto($dom_cmp->documentElement); 47 | $this->assertInstanceOf(Generico::class, $pis_generico); 48 | 49 | $xml = $pis_generico->getNode(); 50 | $dom = $xml->ownerDocument; 51 | 52 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 53 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/PIS/IsentoTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testIsentoXML() 15 | { 16 | $pis_isento = new Isento(); 17 | $pis_isento->setTributacao(Isento::TRIBUTACAO_MONOFASICA); 18 | $pis_isento->fromArray($pis_isento); 19 | $pis_isento->fromArray($pis_isento->toArray()); 20 | $pis_isento->fromArray(null); 21 | 22 | $xml = $pis_isento->getNode(); 23 | $dom = $xml->ownerDocument; 24 | 25 | if (getenv('TEST_MODE') == 'override') { 26 | $dom->formatOutput = true; 27 | file_put_contents( 28 | $this->resource_path . '/xml/imposto/pis/testIsentoXML.xml', 29 | $dom->saveXML($xml) 30 | ); 31 | } 32 | 33 | $dom_cmp = new \DOMDocument(); 34 | $dom_cmp->preserveWhiteSpace = false; 35 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testIsentoXML.xml'); 36 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 37 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 38 | } 39 | 40 | public function testIsentoLoadXML() 41 | { 42 | $dom_cmp = new \DOMDocument(); 43 | $dom_cmp->preserveWhiteSpace = false; 44 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testIsentoXML.xml'); 45 | 46 | $pis_isento = Isento::loadImposto($dom_cmp->documentElement); 47 | $this->assertInstanceOf(Isento::class, $pis_isento); 48 | 49 | $xml = $pis_isento->getNode(); 50 | $dom = $xml->ownerDocument; 51 | 52 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 53 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/PIS/QuantidadeTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(__DIR__)))) . '/resources'; 12 | } 13 | 14 | public function testQuantidadeXML() 15 | { 16 | $pis_quantidade = new Quantidade(); 17 | $pis_quantidade->setQuantidade(1000); 18 | $pis_quantidade->setAliquota(0.0076); 19 | $pis_quantidade->fromArray($pis_quantidade); 20 | $pis_quantidade->fromArray($pis_quantidade->toArray()); 21 | $pis_quantidade->fromArray(null); 22 | 23 | $xml = $pis_quantidade->getNode(); 24 | $dom = $xml->ownerDocument; 25 | 26 | if (getenv('TEST_MODE') == 'override') { 27 | $dom->formatOutput = true; 28 | file_put_contents( 29 | $this->resource_path . '/xml/imposto/pis/testQuantidadeXML.xml', 30 | $dom->saveXML($xml) 31 | ); 32 | } 33 | 34 | $dom_cmp = new \DOMDocument(); 35 | $dom_cmp->preserveWhiteSpace = false; 36 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testQuantidadeXML.xml'); 37 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 38 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 39 | } 40 | 41 | public function testQuantidadeLoadXML() 42 | { 43 | $dom_cmp = new \DOMDocument(); 44 | $dom_cmp->preserveWhiteSpace = false; 45 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/testQuantidadeXML.xml'); 46 | 47 | $pis_quantidade = Quantidade::loadImposto($dom_cmp->documentElement); 48 | $this->assertInstanceOf(Quantidade::class, $pis_quantidade); 49 | 50 | $xml = $pis_quantidade->getNode(); 51 | $dom = $xml->ownerDocument; 52 | 53 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 54 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/PIS/ST/AliquotaTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testAliquotaXML() 15 | { 16 | $pisst_aliquota = new Aliquota(); 17 | $pisst_aliquota->setTributacao(Aliquota::TRIBUTACAO_NORMAL); 18 | $pisst_aliquota->setBase(100.00); 19 | $pisst_aliquota->setAliquota(0.65); 20 | $pisst_aliquota->fromArray($pisst_aliquota); 21 | $pisst_aliquota->fromArray($pisst_aliquota->toArray()); 22 | $pisst_aliquota->fromArray(null); 23 | 24 | $xml = $pisst_aliquota->getNode(); 25 | $dom = $xml->ownerDocument; 26 | 27 | if (getenv('TEST_MODE') == 'override') { 28 | $dom->formatOutput = true; 29 | file_put_contents( 30 | $this->resource_path . '/xml/imposto/pis/st/testAliquotaXML.xml', 31 | $dom->saveXML($xml) 32 | ); 33 | } 34 | 35 | $dom_cmp = new \DOMDocument(); 36 | $dom_cmp->preserveWhiteSpace = false; 37 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/st/testAliquotaXML.xml'); 38 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 39 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 40 | } 41 | 42 | public function testAliquotaLoadXML() 43 | { 44 | $dom_cmp = new \DOMDocument(); 45 | $dom_cmp->preserveWhiteSpace = false; 46 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/st/testAliquotaXML.xml'); 47 | 48 | $pisst_aliquota = Aliquota::loadImposto($dom_cmp->documentElement); 49 | $this->assertInstanceOf(Aliquota::class, $pisst_aliquota); 50 | 51 | $xml = $pisst_aliquota->getNode(); 52 | $dom = $xml->ownerDocument; 53 | 54 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 55 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/PIS/ST/QuantidadeTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/resources'; 12 | } 13 | 14 | public function testQuantidadeXML() 15 | { 16 | $pisst_quantidade = new Quantidade(); 17 | $pisst_quantidade->setQuantidade(1000); 18 | $pisst_quantidade->setAliquota(0.0076); 19 | $pisst_quantidade->fromArray($pisst_quantidade); 20 | $pisst_quantidade->fromArray($pisst_quantidade->toArray()); 21 | $pisst_quantidade->fromArray(null); 22 | 23 | $xml = $pisst_quantidade->getNode(); 24 | $dom = $xml->ownerDocument; 25 | 26 | if (getenv('TEST_MODE') == 'override') { 27 | $dom->formatOutput = true; 28 | file_put_contents( 29 | $this->resource_path . '/xml/imposto/pis/st/testQuantidadeXML.xml', 30 | $dom->saveXML($xml) 31 | ); 32 | } 33 | 34 | $dom_cmp = new \DOMDocument(); 35 | $dom_cmp->preserveWhiteSpace = false; 36 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/st/testQuantidadeXML.xml'); 37 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 38 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 39 | } 40 | 41 | public function testQuantidadeLoadXML() 42 | { 43 | $dom_cmp = new \DOMDocument(); 44 | $dom_cmp->preserveWhiteSpace = false; 45 | $dom_cmp->load($this->resource_path . '/xml/imposto/pis/st/testQuantidadeXML.xml'); 46 | 47 | $pisst_quantidade = Quantidade::loadImposto($dom_cmp->documentElement); 48 | $this->assertInstanceOf(Quantidade::class, $pisst_quantidade); 49 | 50 | $xml = $pisst_quantidade->getNode(); 51 | $dom = $xml->ownerDocument; 52 | 53 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 54 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Imposto/TotalTest.php: -------------------------------------------------------------------------------- 1 | resource_path = dirname(dirname(dirname(__DIR__))) . '/resources'; 12 | } 13 | 14 | public function testTotalXML() 15 | { 16 | $total = new \NFe\Entity\Imposto\Total(); 17 | $total->setBase(883.12); 18 | $total->setAliquota(100.00); 19 | $total->fromArray($total); 20 | $total->fromArray($total->toArray()); 21 | $total->fromArray(null); 22 | 23 | $xml = $total->getNode(); 24 | $dom = $xml->ownerDocument; 25 | 26 | if (getenv('TEST_MODE') == 'override') { 27 | $dom->formatOutput = true; 28 | file_put_contents( 29 | $this->resource_path . '/xml/imposto/testTotalXML.xml', 30 | $dom->saveXML($xml) 31 | ); 32 | } 33 | 34 | $dom_cmp = new \DOMDocument(); 35 | $dom_cmp->preserveWhiteSpace = false; 36 | $dom_cmp->load($this->resource_path . '/xml/imposto/testTotalXML.xml'); 37 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 38 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 39 | } 40 | 41 | public function testTotalLoadXML() 42 | { 43 | $dom_cmp = new \DOMDocument(); 44 | $dom_cmp->preserveWhiteSpace = false; 45 | $dom_cmp->load($this->resource_path . '/xml/imposto/testTotalXML.xml'); 46 | 47 | $total = new \NFe\Entity\Imposto\Total(); 48 | $total->loadNode($dom_cmp->documentElement); 49 | 50 | $xml = $total->getNode(); 51 | $dom = $xml->ownerDocument; 52 | 53 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 54 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/NFe/Entity/ImpostoTest.php: -------------------------------------------------------------------------------- 1 | appendChild($dom->createElement('invalid')); 11 | $this->assertFalse(Imposto::loadImposto($dom->documentElement)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/NFe/Entity/LacreTest.php: -------------------------------------------------------------------------------- 1 | setNumero(123); 15 | $lacre->fromArray($lacre); 16 | $lacre->fromArray($lacre->toArray()); 17 | $lacre->fromArray(null); 18 | 19 | $this->assertEquals(123, $lacre->getNumero()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/NFe/Entity/MunicipioTest.php: -------------------------------------------------------------------------------- 1 | sefaz = \NFe\Core\SEFAZ::getInstance(true); 12 | } 13 | 14 | public function testMunicipio() 15 | { 16 | $municipio = new \NFe\Entity\Municipio(); 17 | $municipio->setNome('Paranavaí'); 18 | $estado = new \NFe\Entity\Estado(); 19 | $estado->setNome('Paraná'); 20 | $estado->setUF('PR'); 21 | $municipio->setEstado($estado); 22 | $municipio->checkCodigos(); 23 | $municipio->fromArray($municipio); 24 | $municipio->fromArray($municipio->toArray()); 25 | $municipio->fromArray(null); 26 | 27 | $this->assertEquals(4118402, $municipio->getCodigo()); 28 | $this->assertEquals('Paranavaí', $municipio->getNome()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/NFe/Entity/PaisTest.php: -------------------------------------------------------------------------------- 1 | setCodigo(1058); 15 | $pais->setNome('Brasil'); 16 | $pais->fromArray($pais); 17 | $pais->fromArray($pais->toArray()); 18 | $pais->fromArray(null); 19 | 20 | $this->assertEquals(1058, $pais->getCodigo()); 21 | $this->assertEquals('Brasil', $pais->getNome()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/NFe/Entity/PesoTest.php: -------------------------------------------------------------------------------- 1 | setLiquido(15.0); 15 | $peso->setBruto(21.0); 16 | $peso->fromArray($peso); 17 | $peso->fromArray($peso->toArray()); 18 | $peso->fromArray(null); 19 | 20 | $this->assertEquals(15.0, $peso->getLiquido()); 21 | $this->assertEquals(21.0, $peso->getBruto()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Transporte/TributoTest.php: -------------------------------------------------------------------------------- 1 | sefaz = \NFe\Core\SEFAZ::getInstance(true); 12 | } 13 | 14 | public function testTributoXML() 15 | { 16 | $retencao = new \NFe\Entity\Transporte\Tributo(); 17 | $retencao->setServico(300.00); 18 | $retencao->setBase(300.00); 19 | $retencao->setAliquota(12.00); 20 | $retencao->setCFOP('5351'); 21 | $retencao->getMunicipio() 22 | ->setNome('Paranavaí') 23 | ->getEstado() 24 | ->setUF('PR'); 25 | $retencao->fromArray($retencao); 26 | $retencao->fromArray($retencao->toArray()); 27 | $retencao->fromArray(null); 28 | 29 | $xml = $retencao->getNode(); 30 | $dom = $xml->ownerDocument; 31 | 32 | if (getenv('TEST_MODE') == 'override') { 33 | $dom->formatOutput = true; 34 | file_put_contents( 35 | dirname(dirname(dirname(__DIR__))) . '/resources/xml/transporte/testTributoXML.xml', 36 | $dom->saveXML($xml) 37 | ); 38 | } 39 | 40 | $dom_cmp = new \DOMDocument(); 41 | $dom_cmp->preserveWhiteSpace = false; 42 | $dom_cmp->load(dirname(dirname(dirname(__DIR__))) . '/resources/xml/transporte/testTributoXML.xml'); 43 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 44 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 45 | } 46 | 47 | public function testTributoLoadXML() 48 | { 49 | $dom_cmp = new \DOMDocument(); 50 | $dom_cmp->preserveWhiteSpace = false; 51 | $dom_cmp->load(dirname(dirname(dirname(__DIR__))) . '/resources/xml/transporte/testTributoXML.xml'); 52 | 53 | $retencao = new \NFe\Entity\Transporte\Tributo(); 54 | $retencao->loadNode($dom_cmp->documentElement); 55 | 56 | $xml = $retencao->getNode(); 57 | $dom = $xml->ownerDocument; 58 | 59 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 60 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/NFe/Entity/Transporte/VeiculoTest.php: -------------------------------------------------------------------------------- 1 | setPlaca('KLM1234'); 15 | $veiculo->setUF('PI'); 16 | $veiculo->setRNTC('123456'); 17 | 18 | $veiculo->fromArray($veiculo); 19 | $veiculo->fromArray($veiculo->toArray()); 20 | $veiculo->fromArray(null); 21 | 22 | $xml = $veiculo->getNode(); 23 | $dom = $xml->ownerDocument; 24 | 25 | if (getenv('TEST_MODE') == 'override') { 26 | $dom->formatOutput = true; 27 | file_put_contents( 28 | dirname(dirname(dirname(__DIR__))) . '/resources/xml/transporte/testVeiculoXML.xml', 29 | $dom->saveXML($xml) 30 | ); 31 | } 32 | 33 | $dom_cmp = new \DOMDocument(); 34 | $dom_cmp->preserveWhiteSpace = false; 35 | $dom_cmp->load(dirname(dirname(dirname(__DIR__))) . '/resources/xml/transporte/testVeiculoXML.xml'); 36 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 37 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 38 | } 39 | 40 | public function testVeiculoLoadXML() 41 | { 42 | $dom_cmp = new \DOMDocument(); 43 | $dom_cmp->preserveWhiteSpace = false; 44 | $dom_cmp->load(dirname(dirname(dirname(__DIR__))) . '/resources/xml/transporte/testVeiculoXML.xml'); 45 | 46 | $veiculo = new \NFe\Entity\Transporte\Veiculo(); 47 | $veiculo->loadNode($dom_cmp->documentElement); 48 | 49 | $xml = $veiculo->getNode(); 50 | $dom = $xml->ownerDocument; 51 | 52 | $xml_cmp = $dom_cmp->saveXML($dom_cmp->documentElement); 53 | $this->assertXmlStringEqualsXmlString($xml_cmp, $dom->saveXML($xml)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/NFe/Exception/ValidationExceptionTest.php: -------------------------------------------------------------------------------- 1 | 'exception details', 'secondField' => 'More details']; 10 | $validation_exception = new ValidationException($errors); 11 | $this->assertEquals($errors, $validation_exception->getErrors()); 12 | $this->assertEquals('exception details', $validation_exception->getMessage()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/NFe/Logger/LogTest.php: -------------------------------------------------------------------------------- 1 | setHandler(new \Monolog\Handler\NullHandler()); 10 | } 11 | 12 | protected function tearDown(): void 13 | { 14 | Log::getInstance()->setHandler(null); 15 | } 16 | 17 | public function testLogs() 18 | { 19 | $this->assertNotNull(Log::getInstance()); 20 | Log::getInstance()->fromArray(Log::getInstance()); 21 | Log::getInstance()->fromArray(Log::getInstance()->toArray()); 22 | Log::getInstance()->fromArray(null); 23 | Log::error('Error Test'); 24 | Log::warning('Warning Test'); 25 | Log::debug('Debug Test'); 26 | Log::info('Information Test'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/NFe/Task/RetornoTest.php: -------------------------------------------------------------------------------- 1 | setDataRecebimento(time()); 11 | return $retorno; 12 | } 13 | 14 | public function testRetornoCondicoes() 15 | { 16 | $retorno = self::createRetorno(); 17 | $retorno->fromArray($retorno); 18 | $retorno->fromArray($retorno->toArray()); 19 | $retorno->fromArray(null); 20 | $retorno->setStatus(101); 21 | $this->assertTrue($retorno->isCancelado()); 22 | $retorno->setStatus(151); 23 | $this->assertTrue($retorno->isCancelado()); 24 | $this->assertFalse($retorno->isDenegada()); 25 | $this->assertFalse($retorno->isInexistente()); 26 | $retorno->setStatus(110); 27 | $this->assertTrue($retorno->isDenegada()); 28 | $retorno->setStatus(301); 29 | $this->assertTrue($retorno->isDenegada()); 30 | $retorno->setStatus(302); 31 | $this->assertTrue($retorno->isDenegada()); 32 | $retorno->setStatus(303); 33 | $this->assertTrue($retorno->isDenegada()); 34 | $retorno->setStatus(217); 35 | $this->assertTrue($retorno->isInexistente()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/NFe/Task/StatusTest.php: -------------------------------------------------------------------------------- 1 | fromArray($status); 19 | $status->fromArray($status->toArray()); 20 | $status->fromArray(null); 21 | $this->assertEquals(self::createStatus(), $status); 22 | } 23 | 24 | public function testNormalization() 25 | { 26 | $status = new Status(); 27 | $status->setAmbiente('1'); 28 | $this->assertEquals(Nota::AMBIENTE_PRODUCAO, $status->getAmbiente()); 29 | $this->assertEquals('1', $status->getAmbiente(true)); 30 | $status->setAmbiente('2'); 31 | $this->assertEquals(Nota::AMBIENTE_HOMOLOGACAO, $status->getAmbiente()); 32 | $this->assertEquals('2', $status->getAmbiente(true)); 33 | $status->setAmbiente('3'); 34 | $this->assertEquals('3', $status->getAmbiente(true)); 35 | } 36 | 37 | public function testStatusLoadInvalidXML() 38 | { 39 | $status = self::createStatus(); 40 | $this->expectException('\Exception'); 41 | $status->loadNode(new \DOMDocument()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tests/resources/certs/private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALHU797VD7GH7AKj 3 | Frimv/loQW3Z0Rf2IEnJi7/Zrvx6a2itkptZ7IrjflJFNsfEdKOp7Wxa0iFcFoVr 4 | Z0eK6RPVYnKgBxfAHUa3GNPZVURJAa1GK6Mxr6im6zp258kmXtGyUCOo39k/FwFd 5 | p7O3Sce+dQH+4HUrxZP0bsRLRXXvAgMBAAECgYABg5yfOxUtH8kkpJrW66SKzRZx 6 | hv8+wvu3ZR3pfkL9J1WuyHuNExDuhc1XiftTbBrKIfJBj+xmGFCgxi9U7pvZab9q 7 | er4XkvZA1PQVTFyRG6AO0fq1jrCpuz4ChMr55MFxKjAHoc/on3JmyzTaNLOHXGpf 8 | W3urt0kQmNMaahFzMQJBANGte7H03kF2fO69NAWbtbVxiTEuvE9n+AcVocsCN3+H 9 | b1wbVROmSZR4oUMM8RMTirpmaDexY4B4xkG1lADud/UCQQDZHmFLZn6+9csQbPFJ 10 | PBgfalEGhdTO6PzTVioyF7hP+km7gfcHNpvj9IQRl1wURrnUd06aq061CPU0PL/P 11 | ctvTAkEAjVhoYS9TwEdysrGC5yDvXlAaDriVouXQcl4nwiVNaj/PVwTp1iQrx9WF 12 | yCBqRtTOmRc9vAVtsQY5h8Qy8GnRHQJBAKsb3y+uIhta2GMkiG/f9V7kyeBrHpDG 13 | W2IumOiLew1EwlENFuLPbcIUFPVMJRwxtQg10nPgqBHScnRtn/jcm1MCQEsnCRQ1 14 | AMt3HHYQyJ/woxF+xMCpRDR3jBadQ/SE8cfiqNSb+6fTTRMXt4Hzm2zNfEbFYBNo 15 | bHg49P3V1fDMOyE= 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /tests/resources/certs/public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEqzCCA5OgAwIBAgIDMTg4MA0GCSqGSIb3DQEBBQUAMIGSMQswCQYDVQQGEwJC 3 | UjELMAkGA1UECBMCUlMxFTATBgNVBAcTDFBvcnRvIEFsZWdyZTEdMBsGA1UEChMU 4 | VGVzdGUgUHJvamV0byBORmUgUlMxHTAbBgNVBAsTFFRlc3RlIFByb2pldG8gTkZl 5 | IFJTMSEwHwYDVQQDExhORmUgLSBBQyBJbnRlcm1lZGlhcmlhIDEwHhcNMDkwNTIy 6 | MTcwNzAzWhcNMTAxMDAyMTcwNzAzWjCBnjELMAkGA1UECBMCUlMxHTAbBgNVBAsT 7 | FFRlc3RlIFByb2pldG8gTkZlIFJTMR0wGwYDVQQKExRUZXN0ZSBQcm9qZXRvIE5G 8 | ZSBSUzEVMBMGA1UEBxMMUE9SVE8gQUxFR1JFMQswCQYDVQQGEwJCUjEtMCsGA1UE 9 | AxMkTkZlIC0gQXNzb2NpYWNhbyBORi1lOjk5OTk5MDkwOTEwMjcwMIGfMA0GCSqG 10 | SIb3DQEBAQUAA4GNADCBiQKBgQCx1O/e1Q+xh+wCoxa4pr/5aEFt2dEX9iBJyYu/ 11 | 2a78emtorZKbWeyK435SRTbHxHSjqe1sWtIhXBaFa2dHiukT1WJyoAcXwB1GtxjT 12 | 2VVESQGtRiujMa+opus6dufJJl7RslAjqN/ZPxcBXaezt0nHvnUB/uB1K8WT9G7E 13 | S0V17wIDAQABo4IBfjCCAXowIgYDVR0jAQEABBgwFoAUPT5TqhNWAm+ZpcVsvB7m 14 | alDBjEQwDwYDVR0TAQH/BAUwAwEBADAPBgNVHQ8BAf8EBQMDAOAAMAwGA1UdIAEB 15 | AAQCMAAwgawGA1UdEQEBAASBoTCBnqA4BgVgTAEDBKAvBC0yMjA4MTk3Nzk5OTk5 16 | OTk5OTk5MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDCgEgYFYEwBAwKgCQQHREZU 17 | LU5GZaAZBgVgTAEDA6AQBA45OTk5OTA5MDkxMDI3MKAXBgVgTAEDB6AOBAwwMDAw 18 | MDAwMDAwMDCBGmRmdC1uZmVAcHJvY2VyZ3MucnMuZ292LmJyMCAGA1UdJQEB/wQW 19 | MBQGCCsGAQUFBwMCBggrBgEFBQcDBDBTBgNVHR8BAQAESTBHMEWgQ6BBhj9odHRw 20 | Oi8vbmZlY2VydGlmaWNhZG8uc2VmYXoucnMuZ292LmJyL0xDUi9BQ0ludGVybWVk 21 | aWFyaWEzOC5jcmwwDQYJKoZIhvcNAQEFBQADggEBAJFytXuiS02eJO0iMQr/Hi+O 22 | x7/vYiPewiDL7s5EwO8A9jKx9G2Baz0KEjcdaeZk9a2NzDEgX9zboPxhw0RkWahV 23 | CP2xvRFWswDIa2WRUT/LHTEuTeKCJ0iF/um/kYM8PmWxPsDWzvsCCRp146lc0lz9 24 | LGm5ruPVYPZ/7DAoimUk3bdCMW/rzkVYg7iitxHrhklxH7YWQHUwbcqPt7Jv0RJx 25 | clc1MhQlV2eM2MO1iIlk8Eti86dRrJVoicR1bwc6/YDqDp4PFONTi1ddewRu6elG 26 | S74AzCcNYRSVTINYiZLpBZO0uivrnTEnsFguVnNtWb9MAHGt3tkR0gAVs6S0fm8= 27 | -----END CERTIFICATE----- 28 | -------------------------------------------------------------------------------- /tests/resources/xml/destinatario/testDestinatarioCPFnaNotaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678912 3 | 9 4 | -------------------------------------------------------------------------------- /tests/resources/xml/destinatario/testDestinatarioFisicoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678912 3 | Fulano da Silva 4 | 5 | Rua Paranavaí 6 | 123 7 | Centro 8 | 123456 9 | Paranavaí 10 | PR 11 | 01122500 12 | 1058 13 | Brasil 14 | 11988220055 15 | 16 | 9 17 | fulano@site.com.br 18 | -------------------------------------------------------------------------------- /tests/resources/xml/destinatario/testDestinatarioJuridicoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678000123 3 | Empresa LTDA 4 | 5 | Rua Paranavaí 6 | 123 7 | Centro 8 | 123456 9 | Paranavaí 10 | PR 11 | 01122500 12 | 1058 13 | Brasil 14 | 15 | 9 16 | 123456789 17 | contato@empresa.com.br 18 | -------------------------------------------------------------------------------- /tests/resources/xml/emitente/testEmitenteXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678000123 3 | Empresa LTDA 4 | Minha Empresa 5 | 6 | Rua Paranavaí 7 | 123 8 | Centro 9 | 123456 10 | Paranavaí 11 | PR 12 | 01122500 13 | 1058 14 | Brasil 15 | 11955886644 16 | 17 | 123456789 18 | 95656 19 | 1 20 | -------------------------------------------------------------------------------- /tests/resources/xml/endereco/testEnderecoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | Rua Paranavaí 3 | 123 4 | Loteamento Paranavaí 5 | Centro 6 | 4118402 7 | Paranavaí 8 | PR 9 | 01122500 10 | 1058 11 | Brasil 12 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/cofins/st/testAliquotaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 100.00 3 | 3.0000 4 | 3.00 5 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/cofins/st/testQuantidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 1000.0000 3 | 0.0076 4 | 7.60 5 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/cofins/testAliquotaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 01 3 | 883.12 4 | 7.6000 5 | 67.12 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/cofins/testGenericoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 99 3 | 3.50 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/cofins/testIsentoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 04 3 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/cofins/testQuantidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 03 3 | 1000.0000 4 | 0.0076 5 | 7.60 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/simples/testCobrancaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 201 4 | 1.2500 5 | 12.96 6 | 4 7 | 100.0000 8 | 10.0000 9 | 162.00 10 | 18.0000 11 | 16.20 12 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/simples/testGenericoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 900 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/simples/testIsentoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 102 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/simples/testNormalXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 101 4 | 1.2500 5 | 12.96 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/simples/testParcialXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 202 4 | 4 5 | 100.0000 6 | 10.0000 7 | 162.00 8 | 18.0000 9 | 29.16 10 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testCobradoFundoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 60 4 | 135.00 5 | 0.0000 6 | 24.30 7 | 135.00 8 | 2.0000 9 | 2.70 10 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testCobradoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 60 4 | 135.00 5 | 0.0000 6 | 24.30 7 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testCobrancaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 10 4 | 3 5 | 100.00 6 | 18.0000 7 | 18.00 8 | 4 9 | 50.0000 10 | 10.0000 11 | 135.00 12 | 18.0000 13 | 6.30 14 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testDiferidoDiferimentoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 51 4 | 3 5 | 1000.00 6 | 18.0000 7 | 120.00 8 | 180.00 9 | 33.3333 10 | 60.00 11 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testDiferidoReducaoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 51 4 | 3 5 | 80.00 6 | 18.0000 7 | 20.0000 8 | 11.52 9 | 100.0000 10 | 11.52 11 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testDiferidoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 51 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testGenericoMargemXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 90 4 | 4 5 | 100.0000 6 | 10.0000 7 | 162.00 8 | 18.0000 9 | 12.96 10 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testGenericoModalidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 90 4 | 3 5 | 90.00 6 | 18.0000 7 | 16.20 8 | 10.0000 9 | 4 10 | 100.0000 11 | 10.0000 12 | 162.00 13 | 18.0000 14 | 12.96 15 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testGenericoReducaoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 90 4 | 3 5 | 90.00 6 | 18.0000 7 | 16.20 8 | 10.0000 9 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testGenericoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 90 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testIntegralFundoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 00 4 | 3 5 | 588.78 6 | 18.0000 7 | 105.98 8 | 2.0000 9 | 11.78 10 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testIntegralXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 00 4 | 3 5 | 588.78 6 | 18.0000 7 | 105.98 8 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testIsentoCondicionalXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 40 4 | 1800.00 5 | 1 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testIsentoNaoTributadoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 41 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testIsentoSuspensaoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 50 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testIsentoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 40 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testMistaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 70 4 | 3 5 | 90.00 6 | 18.0000 7 | 16.20 8 | 10.0000 9 | 4 10 | 100.0000 11 | 10.0000 12 | 162.00 13 | 18.0000 14 | 12.96 15 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testParcialFundoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 30 4 | 4 5 | 50.0000 6 | 10.0000 7 | 135.00 8 | 18.0000 9 | 24.30 10 | 135.00 11 | 2.0000 12 | 2.70 13 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testParcialXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 30 4 | 4 5 | 50.0000 6 | 10.0000 7 | 135.00 8 | 18.0000 9 | 24.30 10 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testPartilhaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 10 4 | 3 5 | 90.00 6 | 18.0000 7 | 16.20 8 | 10.0000 9 | 4 10 | 100.0000 11 | 10.0000 12 | 162.00 13 | 18.0000 14 | 12.96 15 | 5.7000 16 | PR 17 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testReducaoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 20 4 | 3 5 | 90.00 6 | 18.0000 7 | 16.20 8 | 10.0000 9 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/icms/testSubstitutoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 41 4 | 135.00 5 | 0.0000 6 | 24.30 7 | 135.00 8 | 24.30 9 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/ipi/testAliquotaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 999 3 | 4 | 50 5 | 1000.00 6 | 7.0000 7 | 70.00 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/ipi/testIsentoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 999 3 | 4 | 01 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/ipi/testQuantidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 999 3 | 4 | 5 | 1000.0000 6 | 0.7640 7 | 764.00 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/pis/st/testAliquotaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 100.00 3 | 0.6500 4 | 0.65 5 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/pis/st/testQuantidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 1000.0000 3 | 0.0076 4 | 7.60 5 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/pis/testAliquotaXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 01 3 | 883.12 4 | 1.6500 5 | 14.57 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/pis/testGenericoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 99 3 | 3.50 4 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/pis/testIsentoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 04 3 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/pis/testQuantidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 03 3 | 1000.0000 4 | 0.0076 5 | 7.60 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/testIIXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 1000.00 3 | 150.00 4 | 100.00 5 | 80 6 | -------------------------------------------------------------------------------- /tests/resources/xml/imposto/testTotalXML.xml: -------------------------------------------------------------------------------- 1 | 883.12 -------------------------------------------------------------------------------- /tests/resources/xml/pagamento/testPagamentoCartaoNaoIntegradoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 04 3 | 4.50 4 | 5 | 2 6 | 01 7 | 8 | -------------------------------------------------------------------------------- /tests/resources/xml/pagamento/testPagamentoCartaoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 03 3 | 4.50 4 | 5 | 1 6 | 60889128000422 7 | 02 8 | 110011 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/xml/pagamento/testPagamentoDinheiroXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 01 3 | 8.10 4 | -------------------------------------------------------------------------------- /tests/resources/xml/pagamento/testPagamentoTrocoXML.xml: -------------------------------------------------------------------------------- 1 | 8.10 -------------------------------------------------------------------------------- /tests/resources/xml/produto/testProdutoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 123456 4 | 7894900011517 5 | REFRIGERANTE COCA-COLA 2L 6 | 22021000 7 | 0300700 8 | 5101 9 | UN 10 | 2.0000 11 | 2.2500000000 12 | 4.50 13 | 7894900011517 14 | UN 15 | 2.0000 16 | 2.2500000000 17 | 2.00 18 | 0.30 19 | 0.20 20 | 0.50 21 | 1 22 | 123 23 | 1 24 | 25 | 26 | 1.48 27 | 28 | 29 | 0 30 | 500 31 | 32 | 33 | 34 | Trib. aprox.: R$ 0,62 Federal e R$ 0,86 Estadual. Fonte: IBPT/empresometro.com.br B047CD 35 | -------------------------------------------------------------------------------- /tests/resources/xml/responsavel/testResponsavelInvalidXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12345678000123 4 | Empresa LTDA 5 | contato@empresa.com.br 6 | 11988220055 7 | 99 8 | aWv6LeEM4X6u4+qBl2OYZ8grigw= 9 | 10 | -------------------------------------------------------------------------------- /tests/resources/xml/responsavel/testResponsavelXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678000123 3 | Empresa LTDA 4 | contato@empresa.com.br 5 | 11988220055 6 | 99 7 | aWv6LeEM4X6u4+qBl2OYZ8grigw= 8 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testAutorizaAutorizadoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 104 15 | Lote processado 16 | 41 17 | 2017-03-16T12:46:05-03:00 18 | 19 | 20 | 2 21 | PR-v3_4_0 22 | 41160908380787000176650010000000811778821925 23 | 2017-03-16T12:46:05-03:00 24 | 141170000156541 25 | hwEYRAov+DBHckwceVSEZ9/jS4M= 26 | 100 27 | Autorizado o uso da NF-e 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testAutorizaProcessamentoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 103 15 | Lote recebido com sucesso 16 | 41 17 | 2017-03-16T13:48:53-03:00 18 | 19 | 411000002566435 20 | 1 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testAutorizaRejeicaoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 785 15 | NFC-e com entrega a domicilio nao permitida pela UF. Entrega a domicilio permitida apenas no territorio do Parana. 16 | 41 17 | 2017-03-16T12:01:27-03:00 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testEventoRegistradoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 1.00 7 | 8 | 9 | 10 | 11 | 12 | 148975389355245 13 | 2 14 | PR-v3_4_0 15 | 41 16 | 128 17 | Lote de Evento Processado 18 | 19 | 20 | 2 21 | PR-v3_4_0 22 | 41 23 | 135 24 | Evento registrado e vinculado a NF-e 25 | 41160908380787000176650010000000811778821925 26 | 110111 27 | Cancelamento 28 | 1 29 | 2017-03-17T09:31:37-03:00 30 | 141170000157685 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testEventoRejeitadoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 1.00 7 | 8 | 9 | 10 | 11 | 12 | 148983823183575 13 | 2 14 | PR-v3_4_0 15 | 41 16 | 128 17 | Lote de Evento Processado 18 | 19 | 20 | 2 21 | PR-v3_4_0 22 | 41 23 | 573 24 | Duplicidade de Evento 25 | 41170326168661000114650010000002491000001046 26 | 110111 27 | Cancelamento 28 | 1 29 | 2017-03-18T08:57:16-03:00 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testInutilizaInutilizadoProtocolo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2 5 | PR-v3_4_0 6 | 102 7 | Inutilizacao de numero homologado 8 | 41 9 | 17 10 | 08380787000176 11 | 65 12 | 1 13 | 250 14 | 250 15 | 2017-03-16T17:09:39+00:00 16 | 141170000156683 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testInutilizaInutilizadoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2 14 | PR-v3_4_0 15 | 102 16 | Inutilizacao de numero homologado 17 | 41 18 | 17 19 | 08380787000176 20 | 65 21 | 1 22 | 250 23 | 250 24 | 2017-03-16T14:09:39-03:00 25 | 141170000156683 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testInutilizaRejeicaoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2 14 | PR-v3_4_0 15 | 241 16 | Um numero da faixa ja foi utilizado 17 | 41 18 | 2017-03-16T14:28:17-03:00 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testReciboAutorizadoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 411000002567085 15 | 104 16 | Lote processado 17 | 41 18 | 2017-03-17T10:05:24-03:00 19 | 20 | 21 | 2 22 | PR-v3_4_0 23 | 41160908380787000176650010000000811778821925 24 | 2017-03-17T10:05:23-03:00 25 | 141170000157685 26 | BC9o7H4Epa4xo60SwYMUdDhn4sM= 27 | 100 28 | Autorizado o uso da NF-e 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testReciboProcessamentoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 411000002567074 15 | 105 16 | Lote processado 17 | 41 18 | 2017-03-17T10:00:34-03:00 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testReciboRejeitadoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 411000002567074 15 | 104 16 | Lote processado 17 | 41 18 | 2017-03-17T10:00:34-03:00 19 | 20 | 21 | 2 22 | PR-v3_4_0 23 | 41160908380787000176650010000000811778821925 24 | 2017-03-17T10:00:33-03:00 25 | LJIVkncxMaxj1NSwMvkRnMmNCIo= 26 | 785 27 | NFC-e com entrega a domicilio nao permitida pela UF Entrega a domicilio permitida apenas no territorio do Parana. 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testReciboSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 2 7 | 411000002567074 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testSituacaoAutorizadoReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 100 15 | Autorizado o uso da NF-e 16 | 41 17 | 2017-03-17T09:26:59-03:00 18 | 41160908380787000176650010000000811778821925 19 | 20 | 21 | 2 22 | PR-v3_4_0 23 | 41160908380787000176650010000000811778821925 24 | 2017-03-16T13:48:53-03:00 25 | 141170000156635 26 | T9qEXQH4xzjdNyZm+UoGq+1mVXY= 27 | 100 28 | Autorizado o uso da NF-e 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testSituacaoInexistenteReponseSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 41 6 | 3.10 7 | 8 | 9 | 10 | 11 | 12 | 2 13 | PR-v3_4_0 14 | 785 15 | NFC-e com entrega a domicilio nao permitida pela UF. Entrega a domicilio permitida apenas no territorio do Parana. 16 | 41 17 | 2017-03-17T09:35:29-03:00 18 | 41160908380787000176650010000000811778821925 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/resources/xml/task/testSituacaoSOAP.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 2 7 | CONSULTAR 8 | 41160908380787000176650010000000811778821925 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/resources/xml/transportador/testTransportadorSemEnderecoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678000123 3 | Empresa LTDA 4 | 123456789 5 | -------------------------------------------------------------------------------- /tests/resources/xml/transportador/testTransportadorXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 12345678000123 3 | Empresa LTDA 4 | 123456789 5 | Rua Paranavaí, 123 - Centro 6 | Paranavaí 7 | PR 8 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testTransporteFreteDestinatarioXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | 4 | 12345678000123 5 | Empresa LTDA 6 | 123456789 7 | Rua Paranavaí, 123 - Centro 8 | Paranavaí 9 | PR 10 | 11 | 12 | 300.00 13 | 300.00 14 | 12.0000 15 | 36.00 16 | 5351 17 | 4118402 18 | 19 | 20 | ALK1232 21 | PR 22 | 123456789 23 | 24 | 25 | KLM1234 26 | PI 27 | 28 | 2A 29 | 522 30 | 31 | 2 32 | caixa 33 | MZSW 34 | 1, 2, 3 35 | 15.000 36 | 21.000 37 | 38 | 123456 39 | 40 | 41 | 123457 42 | 43 | 44 | 123458 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testTransporteFreteTerceirosXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 2 3 | 4 | 12345678000123 5 | Empresa LTDA 6 | 123456789 7 | Rua Paranavaí, 123 - Centro 8 | Paranavaí 9 | PR 10 | 11 | 12 | 300.00 13 | 300.00 14 | 12.0000 15 | 36.00 16 | 5351 17 | 4118402 18 | 19 | 20 | ALK1232 21 | PR 22 | 123456789 23 | 24 | 25 | KLM1234 26 | PI 27 | 28 | 2A 29 | 522 30 | 31 | 2 32 | caixa 33 | MZSW 34 | 1, 2, 3 35 | 15.000 36 | 21.000 37 | 38 | 123456 39 | 40 | 41 | 123457 42 | 43 | 44 | 123458 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testTransporteNenhumXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 3 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testTransporteSemModalidadeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testTransporteXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 4 | 12345678000123 5 | Empresa LTDA 6 | 123456789 7 | Rua Paranavaí, 123 - Centro 8 | Paranavaí 9 | PR 10 | 11 | 12 | 300.00 13 | 300.00 14 | 12.0000 15 | 36.00 16 | 5351 17 | 4118402 18 | 19 | 20 | ALK1232 21 | PR 22 | 123456789 23 | 24 | 25 | KLM1234 26 | PI 27 | 28 | 2A 29 | 522 30 | 31 | 2 32 | caixa 33 | MZSW 34 | 1, 2, 3 35 | 15.000 36 | 21.000 37 | 38 | 123456 39 | 40 | 41 | 123457 42 | 43 | 44 | 123458 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testTributoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 300.00 3 | 300.00 4 | 12.0000 5 | 36.00 6 | 5351 7 | 4118402 8 | -------------------------------------------------------------------------------- /tests/resources/xml/transporte/testVeiculoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | KLM1234 3 | PI 4 | 123456 5 | -------------------------------------------------------------------------------- /tests/resources/xml/volume/testVolumeSemPesoXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2 4 | caixa 5 | MZSW 6 | 1, 2, 3 7 | 8 | 123456 9 | 10 | 11 | 123457 12 | 13 | 14 | 123458 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/resources/xml/volume/testVolumeXML.xml: -------------------------------------------------------------------------------- 1 | 2 | 2 3 | caixa 4 | MZSW 5 | 1, 2, 3 6 | 15.000 7 | 21.000 8 | 9 | 123456 10 | 11 | 12 | 123457 13 | 14 | 15 | 123458 16 | 17 | -------------------------------------------------------------------------------- /utils/SQLtoClass.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/utils/SQLtoClass.jar -------------------------------------------------------------------------------- /utils/atualiza_servicos.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | mkdir -p "../storage/generated/src/NFe/Database/data" 4 | php -f atualiza_servicos.php "../storage/generated/src/NFe/Database/data" 5 | -------------------------------------------------------------------------------- /utils/atualiza_servicos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p ../storage/generated/src/NFe/Database/data 4 | php -f atualiza_servicos.php ../storage/generated/src/NFe/Database/data 5 | -------------------------------------------------------------------------------- /utils/classes_base.mwb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/utils/classes_base.mwb -------------------------------------------------------------------------------- /utils/config.properties: -------------------------------------------------------------------------------- 1 | #generator 2 | #Sun Nov 27 22:06:13 GFT 2016 3 | file=utils/classes_base.sql 4 | upperWords=|URL|CPF|CNPJ|RG|IE|IM|UF|CEP|GUID|PID|NCM|CFOP|CEST|ICMS|IPI|PIS|IP| 5 | -------------------------------------------------------------------------------- /utils/copy_paste_detector.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | set PATH=%PATH%;%~pd0..\vendor\bin 3 | 4 | cd .. 5 | cmd /C phpcpd src 6 | cmd /C phpcpd tests\NFe 7 | cd %~pd0 8 | 9 | pause 10 | -------------------------------------------------------------------------------- /utils/esboco.json: -------------------------------------------------------------------------------- 1 | NE: { 2 | Protocolo: { 3 | }, 4 | Autorizacao: { 5 | enviar 6 | executar 7 | }, 8 | Inutilizacao: { 9 | executar 10 | }, 11 | Evento: { 12 | cancelar: { 13 | justificativa 14 | }, 15 | prorrogar: { 16 | 17 | } 18 | }, 19 | Retorno: { 20 | codigo 21 | motivo 22 | node 23 | } 24 | } -------------------------------------------------------------------------------- /utils/generate_doc.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | set PATH=%PATH%;%~pd0..\vendor\bin 3 | 4 | cd .. 5 | cmd /C phpdoc --progressbar --sourcecode -d src\NFe -t docs\docs 6 | cd %~pd0 7 | start %~pd0..\docs\docs\index.html 8 | -------------------------------------------------------------------------------- /utils/mess_detector.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | set PATH=%PATH%;%~pd0..\vendor\bin 3 | 4 | cd .. 5 | cmd /C phpmd src text cleancode,codesize,controversial,design,unusedcode > utils\tmp\analisys.txt 6 | cd %~pd0 7 | 8 | pause 9 | -------------------------------------------------------------------------------- /utils/openssl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mazinsw/nfe-api/238eb671ed579d49bb8560342b5cc75f49deab88/utils/openssl.exe -------------------------------------------------------------------------------- /utils/pfx_to_pem.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | openssl pkcs12 -in cert.pfx -out public.pem -clcerts -nokeys -nodes -passin pass:associacao 3 | openssl x509 -in public.pem -out public.pem 4 | 5 | openssl pkcs12 -in cert.pfx -out private.pem -nocerts -nodes -passin pass:associacao 6 | openssl rsa -in private.pem -out private.pem 7 | 8 | pause -------------------------------------------------------------------------------- /utils/run_phploc.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | set PATH=%PATH%;%~pd0..\vendor\bin 3 | 4 | cd .. 5 | cmd /C phploc src 6 | cd %~pd0 7 | 8 | pause 9 | -------------------------------------------------------------------------------- /utils/update_IBPT.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | rm -f utils\IBPT\*.* 4 | 5 | svn checkout https://github.com/frones/ACBr/trunk/Exemplos/ACBrTCP/ACBrIBPTax/tabela utils\IBPT 6 | 7 | php -f utils\update_IBPT.php "utils\IBPT" "src\NFe\Database\data\IBPT" 8 | -------------------------------------------------------------------------------- /utils/update_IBPT.php: -------------------------------------------------------------------------------- 1 | isDot()) { 31 | continue; 32 | } 33 | if (! preg_match('/TabelaIBPTax([A-Z]{2})(.*)\.csv/s', $filename, $info)) { 34 | // outros arquivos na pasta 35 | continue; 36 | } 37 | $csv = csv_to_array($source_folder . '/' . $filename, ';'); 38 | $uf = $info[1]; 39 | $first = current($csv); 40 | $vigenciainicio = date_create_from_format('d/m/Y', $first['vigenciainicio']); 41 | $vigenciafim = date_create_from_format('d/m/Y', $first['vigenciafim']); 42 | $info = [ 43 | 'fonte' => $first['fonte'], 44 | 'versao' => $first['versao'], 45 | 'chave' => $first['chave'], 46 | 'vigencia' => [ 47 | 'inicio' => date_format($vigenciainicio, 'Y-m-d'), 48 | 'fim' => date_format($vigenciafim, 'Y-m-d') 49 | ] 50 | ]; 51 | $items = []; 52 | foreach ($csv as $row) { 53 | $o = [ 54 | 'importado' => floatval($row['importadosfederal']), 55 | 'nacional' => floatval($row['nacionalfederal']), 56 | 'estadual' => floatval($row['estadual']), 57 | 'municipal' => floatval($row['municipal']), 58 | 'tipo' => $row['tipo'] 59 | ]; 60 | $key = $row['codigo'] . '.' . sprintf('%02s', $row['ex']); 61 | $items[$key] = $o; 62 | } 63 | $data = [ 64 | 'info' => $info, 65 | 'estados' => [$uf => $items] 66 | ]; 67 | $data = json_encode($data); 68 | $outfile = $dest_folder . '/' . $uf . '.json'; 69 | echo 'Writing ' . $outfile . "\n"; 70 | file_put_contents($outfile, $data); 71 | } 72 | -------------------------------------------------------------------------------- /utils/update_IBPT.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASEDIR=`pwd`/$(dirname $0) 4 | 5 | cd $BASEDIR 6 | curl -o "ACBr.zip" https://codeload.github.com/ProjetoACBr/ACBr/zip/refs/heads/master 7 | rm -rf "IBPT" 8 | unzip "ACBr.zip" "ACBr-master/Exemplos/ACBrTCP/ACBrIBPTax/tabela/*" 9 | mv "ACBr-master/Exemplos/ACBrTCP/ACBrIBPTax/tabela" "IBPT" 10 | rm -rf "ACBr-master" 11 | php -f "update_IBPT.php" "IBPT" "../src/NFe/Database/data/IBPT" 12 | --------------------------------------------------------------------------------