From ab3f58f19ff6820e1123a83f46f6acb26f332ade Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Tue, 14 Nov 2023 14:55:47 -0300 Subject: [PATCH 01/13] GNRE --- lib/Sped/Gnre/Helper/GnreHelper.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Sped/Gnre/Helper/GnreHelper.php b/lib/Sped/Gnre/Helper/GnreHelper.php index 920301f..677031b 100644 --- a/lib/Sped/Gnre/Helper/GnreHelper.php +++ b/lib/Sped/Gnre/Helper/GnreHelper.php @@ -79,6 +79,9 @@ public static function parseNf($xmlNf): stdClass $xml = simplexml_load_string($xmlNf); $parsed = new stdClass(); + if (!$xml->NFe) + return null; + $parsed->CEPEmpresa = $xml->NFe->infNFe->emit->enderEmit->CEP; $parsed->EnderecoEmpresa = $xml->NFe->infNFe->emit->enderEmit->xLgr; From 17cfac957eef20a0fd5063baf9d46d42b18ddc1d Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Tue, 14 Nov 2023 16:02:06 -0300 Subject: [PATCH 02/13] GNRE --- lib/Sped/Gnre/Helper/GnreHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sped/Gnre/Helper/GnreHelper.php b/lib/Sped/Gnre/Helper/GnreHelper.php index 677031b..0894c37 100644 --- a/lib/Sped/Gnre/Helper/GnreHelper.php +++ b/lib/Sped/Gnre/Helper/GnreHelper.php @@ -74,7 +74,7 @@ public static function getGuiaGnre($xmlNf): Guia } - public static function parseNf($xmlNf): stdClass + public static function parseNf($xmlNf): ?stdClass { $xml = simplexml_load_string($xmlNf); $parsed = new stdClass(); From c98e266ad4273bea367a755aeca1775fb8c73ee2 Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Tue, 21 Nov 2023 10:51:52 -0300 Subject: [PATCH 03/13] GNRE --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 7125261..7d9db7a 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "laminas/laminas-barcode": "^2.3", "smarty/smarty": "~3.1", "nfephp-org/sped-nfe": "~5.0", + "nfephp-org/sped-common": "^5.1.0", "ext-gd": "*", "ext-dom": "*" }, From 07e034b2ad8857576d6176abe24ef993ace297d2 Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Tue, 21 Nov 2023 15:50:53 -0300 Subject: [PATCH 04/13] GNRE --- composer.json | 3 +-- lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php | 1 + lib/Sped/Gnre/Exception/CannotOpenCertificate.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 7d9db7a..33e2fc3 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,7 @@ "laminas/laminas-servicemanager": "~3.0", "laminas/laminas-barcode": "^2.3", "smarty/smarty": "~3.1", - "nfephp-org/sped-nfe": "~5.0", - "nfephp-org/sped-common": "^5.1.0", + "nfephp-org/sped-nfe": "~5.0", "ext-gd": "*", "ext-dom": "*" }, diff --git a/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php b/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php index e6fcddf..394012f 100644 --- a/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php +++ b/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php @@ -77,6 +77,7 @@ public function open($password) $key = file_get_contents($this->filePath); $dataCertificate = array(); if (!openssl_pkcs12_read($key, $dataCertificate, $password)) { + print_r($dataCertificate); throw new CannotOpenCertificate($this->filePath); } diff --git a/lib/Sped/Gnre/Exception/CannotOpenCertificate.php b/lib/Sped/Gnre/Exception/CannotOpenCertificate.php index a0718ae..731ddea 100644 --- a/lib/Sped/Gnre/Exception/CannotOpenCertificate.php +++ b/lib/Sped/Gnre/Exception/CannotOpenCertificate.php @@ -37,7 +37,7 @@ public function __construct($certificate) { parent::__construct( 'Não foi possível abrir o certificado ' . $certificate . ' verifique a senha informada', - null, + 0, null ); } From 84d446b9e91083caecde2dd62ddc75f8a0938893 Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Tue, 21 Nov 2023 16:40:44 -0300 Subject: [PATCH 05/13] GNRE --- lib/Sped/Gnre/Sefaz/Lote.php | 4 ++-- testes/Sefaz/LoteTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Sped/Gnre/Sefaz/Lote.php b/lib/Sped/Gnre/Sefaz/Lote.php index 8ebaa39..fefd460 100755 --- a/lib/Sped/Gnre/Sefaz/Lote.php +++ b/lib/Sped/Gnre/Sefaz/Lote.php @@ -71,8 +71,8 @@ public function setEstadoFactory(EstadoFactory $estadoFactory) public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreRecepcaoLote' : - 'http://www.gnre.pe.gov.br/webservice/GnreRecepcaoLote'; + 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', diff --git a/testes/Sefaz/LoteTest.php b/testes/Sefaz/LoteTest.php index 186ba67..b535ce3 100644 --- a/testes/Sefaz/LoteTest.php +++ b/testes/Sefaz/LoteTest.php @@ -17,7 +17,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $lote = new Lote(); $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreRecepcaoLote"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } @@ -323,7 +323,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebServiceDetes $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreRecepcaoLote"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } From 13337bda6e1becd22a7b1b5fb679caae27f6f2c6 Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Tue, 21 Nov 2023 16:50:28 -0300 Subject: [PATCH 06/13] Update HTTPS --- README.md | 6 +- exemplos/xml/envelope-consulta-config-uf.xml | 4 +- exemplos/xml/envelope-consultar-gnre.xml | 6 +- exemplos/xml/estrutura-lote-completo-gnre.xml | 6 +- ...-emit-cnpj-dest-cnpj-sem-campos-extras.xml | 6 +- ...te-emit-cpf-dest-cpf-sem-campos-extras.xml | 6 +- ...ote-emit-cpf-dest-cpf-sem-cep-emitente.xml | 6 +- ...st-cpf-sem-inscricao-estadual-emitente.xml | 6 +- ...mit-cpf-dest-cpf-sem-telefone-emitente.xml | 6 +- exemplos/xml/resultado-consulta-gnre.xml | 4 +- lib/Sped/Gnre/Sefaz/ConfigUf.php | 8 +- lib/Sped/Gnre/Sefaz/Consulta.php | 12 +- lib/Sped/Gnre/Sefaz/Guia.php | 22 +- lib/Sped/Gnre/Sefaz/Lote.php | 12 +- lib/Sped/Gnre/Sefaz/LoteV2.php | 8 +- testes/Sefaz/ConfigUfTest.php | 4 +- testes/Sefaz/ConsultaTest.php | 4 +- testes/Sefaz/LoteTest.php | 4 +- wsdl/GnreLoteResultado.wsdl | 8 +- wsdl/GnreRecepcaoLote.wsdl | 8 +- xsd/v1/config_uf_v1.00.xsd | 4 +- xsd/v1/consulta_config_uf_v1.00.xsd | 4 +- xsd/v1/lote_gnre_consulta_v1.00.xsd | 4 +- xsd/v1/lote_gnre_recibo_v1.00.xsd | 4 +- xsd/v1/lote_gnre_result_v1.00.xsd | 4 +- xsd/v1/lote_gnre_v1.00.xsd | 1107 +++++++++-------- xsd/v1/tiposBasicoGNRE_v1.00.xsd | 2 +- xsd/v2/dados_gnre_v2.00.xsd | 10 +- xsd/v2/lote_gnre_result_v2.00.xsd | 4 +- xsd/v2/lote_gnre_v2.00.xsd | 4 +- xsd/v2/tiposBasicoGNRE_v2.00.xsd | 8 +- 31 files changed, 651 insertions(+), 650 deletions(-) diff --git a/README.md b/README.md index 5b90361..4f6a8f5 100755 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Antes de usar a API - É necessário entrar em contato com a SEFAZ de cada estado pedindo liberação do serviço de emissão de GNRE. -- Leita todos os tópicos no FAQ oficial em http://www.gnre.pe.gov.br/gnre/portal/faq.jsp. Os tópicos abordados são muito úteis para quem está começando nesse serviço. +- Leita todos os tópicos no FAQ oficial em https://www.gnre.pe.gov.br/gnre/portal/faq.jsp. Os tópicos abordados são muito úteis para quem está começando nesse serviço. GNRE PHP ================= @@ -88,10 +88,10 @@ Informações úteis |Descrição|Endereço| |---------|--------| |Grupo de discussão | https://groups.google.com/forum/#!forum/gnrephp| -|Site oficial do governo | http://www.gnre.pe.gov.br/gnre/index.html| +|Site oficial do governo | https://www.gnre.pe.gov.br/gnre/index.html| |Site do Projeto | http://nfephp-org.github.io/sped-gnre/| |Wiki, onde é possível encontrar maiores informações de como utilizar a API | https://github.com/nfephp-org/sped-gnre/wiki| -|Site oficial da SEFAZ de todo os estados|http://www.gnre.pe.gov.br/gnre/portal/linksUteis.jsp| +|Site oficial da SEFAZ de todo os estados|https://www.gnre.pe.gov.br/gnre/portal/linksUteis.jsp| 1. Antes de gerar qualquer guia GNRE com o seu certificado, tenha **CERTEZA** que você possui autorização para isso. A geração de GNRE depende de cada estado, ou seja, se você deseja gerar a guia para o Acre (com destino ao Acre) tenha certeza que diff --git a/exemplos/xml/envelope-consulta-config-uf.xml b/exemplos/xml/envelope-consulta-config-uf.xml index a943235..50ec079 100644 --- a/exemplos/xml/envelope-consulta-config-uf.xml +++ b/exemplos/xml/envelope-consulta-config-uf.xml @@ -1,5 +1,5 @@ - + 1.00 @@ -7,7 +7,7 @@ - + 1 PR 100099 diff --git a/exemplos/xml/envelope-consultar-gnre.xml b/exemplos/xml/envelope-consultar-gnre.xml index d2fae69..2bfa475 100644 --- a/exemplos/xml/envelope-consultar-gnre.xml +++ b/exemplos/xml/envelope-consultar-gnre.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 12345678 123 diff --git a/exemplos/xml/estrutura-lote-completo-gnre.xml b/exemplos/xml/estrutura-lote-completo-gnre.xml index fa409a3..0c248a4 100755 --- a/exemplos/xml/estrutura-lote-completo-gnre.xml +++ b/exemplos/xml/estrutura-lote-completo-gnre.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml b/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml index 65c2a13..5f35fc5 100644 --- a/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml +++ b/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml index d956532..835ab54 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml index e46a37d..b8ed129 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml index c3f5b92..e39339c 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml index 7599898..49e119d 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/resultado-consulta-gnre.xml b/exemplos/xml/resultado-consulta-gnre.xml index 0223729..ef29c72 100644 --- a/exemplos/xml/resultado-consulta-gnre.xml +++ b/exemplos/xml/resultado-consulta-gnre.xml @@ -1,8 +1,8 @@ - - + + 1 0000000000 diff --git a/lib/Sped/Gnre/Sefaz/ConfigUf.php b/lib/Sped/Gnre/Sefaz/ConfigUf.php index bba02ab..c4794ce 100644 --- a/lib/Sped/Gnre/Sefaz/ConfigUf.php +++ b/lib/Sped/Gnre/Sefaz/ConfigUf.php @@ -41,8 +41,8 @@ class ConfigUf extends ConsultaConfigUf public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreConfigUF' : - 'http://www.gnre.pe.gov.br/webservice/GnreConfigUF'; + 'https://www.testegnre.pe.gov.br/webservice/GnreConfigUF' : + 'https://www.gnre.pe.gov.br/webservice/GnreConfigUF'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -72,7 +72,7 @@ public function toXml() $gnre->preserveWhiteSpace = false; $consulta = $gnre->createElement('TConsultaConfigUf'); - $consulta->setAttribute('xmlns', 'http://www.gnre.pe.gov.br'); + $consulta->setAttribute('xmlns', 'https://www.gnre.pe.gov.br'); $ambiente = $gnre->createElement('ambiente', $this->getEnvironment()); $estado = $gnre->createElement('uf', $this->getEstado()); @@ -95,7 +95,7 @@ public function getSoapEnvelop($gnre, $consulta) { $soapEnv = $gnre->createElement('soap12:Envelope'); $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); - $soapEnv->setAttribute('xmlns:gnr', 'http://www.gnre.pe.gov.br/webservice/GnreConfigUF'); + $soapEnv->setAttribute('xmlns:gnr', 'https://www.gnre.pe.gov.br/webservice/GnreConfigUF'); $gnreCabecalhoSoap = $gnre->createElement('gnr:gnreCabecMsg'); $gnreCabecalhoSoap->appendChild($gnre->createElement('gnr:versaoDados', '1.00')); diff --git a/lib/Sped/Gnre/Sefaz/Consulta.php b/lib/Sped/Gnre/Sefaz/Consulta.php index b41f81d..111d70a 100644 --- a/lib/Sped/Gnre/Sefaz/Consulta.php +++ b/lib/Sped/Gnre/Sefaz/Consulta.php @@ -42,8 +42,8 @@ class Consulta extends ConsultaGnre public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : - 'http://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; + 'https://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : + 'https://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -71,7 +71,7 @@ public function toXml() $gnre->preserveWhiteSpace = false; $consulta = $gnre->createElement('TConsLote_GNRE'); - $consulta->setAttribute('xmlns', 'http://www.gnre.pe.gov.br'); + $consulta->setAttribute('xmlns', 'https://www.gnre.pe.gov.br'); $ambiente = $gnre->createElement('ambiente', $this->getEnvironment()); $numeroRecibo = $gnre->createElement('numeroRecibo', $this->getRecibo()); @@ -95,7 +95,7 @@ public function getSoapEnvelop($gnre, $consulta) $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); $gnreCabecalhoSoap = $gnre->createElement('gnreCabecMsg'); - $gnreCabecalhoSoap->setAttribute('xmlns', 'http://www.gnre.pe.gov.br/wsdl/consultar'); + $gnreCabecalhoSoap->setAttribute('xmlns', 'https://www.gnre.pe.gov.br/wsdl/consultar'); $gnreCabecalhoSoap->appendChild($gnre->createElement('versaoDados', '1.00')); $soapHeader = $gnre->createElement('soap12:Header'); @@ -105,8 +105,8 @@ public function getSoapEnvelop($gnre, $consulta) $gnre->appendChild($soapEnv); $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : - 'http://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; + 'https://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : + 'https://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; $gnreDadosMsg = $gnre->createElement('gnreDadosMsg'); $gnreDadosMsg->setAttribute('xmlns', $action); diff --git a/lib/Sped/Gnre/Sefaz/Guia.php b/lib/Sped/Gnre/Sefaz/Guia.php index 2d29b13..b74743a 100755 --- a/lib/Sped/Gnre/Sefaz/Guia.php +++ b/lib/Sped/Gnre/Sefaz/Guia.php @@ -47,7 +47,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c02_receita; @@ -55,7 +55,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c25_detalhamentoReceita; @@ -63,7 +63,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c26_produto; @@ -71,7 +71,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c27_tipoIdentificacaoEmitente; @@ -86,7 +86,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c28_tipoDocOrigem; @@ -94,7 +94,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c04_docOrigem; @@ -125,7 +125,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c15_convenio; @@ -183,7 +183,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c34_tipoIdentificacaoDestinatario; @@ -264,7 +264,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo string * para maiores informações visualizar a documentação oficial do GNRE - * http://www.gnre.pe.gov.br/gnre/index.html + * https://www.gnre.pe.gov.br/gnre/index.html * @var string */ private $c42_identificadorGuia; @@ -325,7 +325,7 @@ class Guia * Dados retornados pelo web service da SEFAZ com a situação * da guia, se foi processada com sucesso ou se houve erro. * Para maiores informações sobre esse item consulte - * a documentação de retorno em http://www.gnre.pe.gov.br/gnre/portal/downloads.jsp + * a documentação de retorno em https://www.gnre.pe.gov.br/gnre/portal/downloads.jsp * @var int */ private $retornoSituacaoGuia; @@ -334,7 +334,7 @@ class Guia * Dados retornados pelo web service da SEFAZ com o numero de sequencia * que a guia tem na SEFAZ. * Para maiores informações sobre esse item consulte - * a documentação de retorno em http://www.gnre.pe.gov.br/gnre/portal/downloads.jsp + * a documentação de retorno em https://www.gnre.pe.gov.br/gnre/portal/downloads.jsp * @var type */ private $retornoSequencialGuia; diff --git a/lib/Sped/Gnre/Sefaz/Lote.php b/lib/Sped/Gnre/Sefaz/Lote.php index fefd460..8a2b91e 100755 --- a/lib/Sped/Gnre/Sefaz/Lote.php +++ b/lib/Sped/Gnre/Sefaz/Lote.php @@ -71,8 +71,8 @@ public function setEstadoFactory(EstadoFactory $estadoFactory) public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -101,7 +101,7 @@ public function toXml() $loteGnre = $gnre->createElement('TLote_GNRE'); $loteXmlns = $gnre->createAttribute('xmlns'); - $loteXmlns->value = 'http://www.gnre.pe.gov.br'; + $loteXmlns->value = 'https://www.gnre.pe.gov.br'; $loteGnre->appendChild($loteXmlns); $guia = $gnre->createElement('guias'); @@ -255,7 +255,7 @@ public function getSoapEnvelop($gnre, $loteGnre) $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); $gnreCabecalhoSoap = $gnre->createElement('gnreCabecMsg'); - $gnreCabecalhoSoap->setAttribute('xmlns', 'http://www.gnre.pe.gov.br/wsdl/processar'); + $gnreCabecalhoSoap->setAttribute('xmlns', 'https://www.gnre.pe.gov.br/wsdl/processar'); $gnreCabecalhoSoap->appendChild($gnre->createElement('versaoDados', '1.00')); $soapHeader = $gnre->createElement('soap12:Header'); @@ -265,8 +265,8 @@ public function getSoapEnvelop($gnre, $loteGnre) $gnre->appendChild($soapEnv); $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; $gnreDadosMsg = $gnre->createElement('gnreDadosMsg'); $gnreDadosMsg->setAttribute('xmlns', $action); diff --git a/lib/Sped/Gnre/Sefaz/LoteV2.php b/lib/Sped/Gnre/Sefaz/LoteV2.php index a4fbf2a..3dba9c5 100644 --- a/lib/Sped/Gnre/Sefaz/LoteV2.php +++ b/lib/Sped/Gnre/Sefaz/LoteV2.php @@ -41,7 +41,7 @@ public function getSoapEnvelop($gnre, $loteGnre) $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); $gnreCabecalhoSoap = $gnre->createElement('gnreCabecMsg'); - $gnreCabecalhoSoap->setAttribute('xmlns', 'http://www.gnre.pe.gov.br/wsdl/processar'); + $gnreCabecalhoSoap->setAttribute('xmlns', 'https://www.gnre.pe.gov.br/wsdl/processar'); $gnreCabecalhoSoap->appendChild($gnre->createElement('versaoDados', '2.00')); $soapHeader = $gnre->createElement('soap12:Header'); @@ -51,8 +51,8 @@ public function getSoapEnvelop($gnre, $loteGnre) $gnre->appendChild($soapEnv); $action = $this->ambienteDeTesteV2 ? - 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; $gnreDadosMsg = $gnre->createElement('gnreDadosMsg'); $gnreDadosMsg->setAttribute('xmlns', $action); @@ -73,7 +73,7 @@ public function toXml() { $loteGnre = $gnre->createElement('TLote_GNRE'); $loteXmlns = $gnre->createAttribute('xmlns'); - $loteXmlns->value = 'http://www.gnre.pe.gov.br'; + $loteXmlns->value = 'https://www.gnre.pe.gov.br'; $loteVersao = $gnre->createAttribute('versao'); $loteVersao->value = '2.00'; diff --git a/testes/Sefaz/ConfigUfTest.php b/testes/Sefaz/ConfigUfTest.php index 8f09813..4256e41 100644 --- a/testes/Sefaz/ConfigUfTest.php +++ b/testes/Sefaz/ConfigUfTest.php @@ -15,7 +15,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreConfigUF"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.gnre.pe.gov.br/webservice/GnreConfigUF"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } @@ -27,7 +27,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebserviceDeTes $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreConfigUF"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.testegnre.pe.gov.br/webservice/GnreConfigUF"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } diff --git a/testes/Sefaz/ConsultaTest.php b/testes/Sefaz/ConsultaTest.php index fb8e8b1..566eb0d 100644 --- a/testes/Sefaz/ConsultaTest.php +++ b/testes/Sefaz/ConsultaTest.php @@ -15,7 +15,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $consulta = new \Sped\Gnre\Sefaz\Consulta(); $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreResultadoLote"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.gnre.pe.gov.br/webservice/GnreResultadoLote"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } @@ -27,7 +27,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebserviceDeTes $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreResultadoLote"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.testegnre.pe.gov.br/webservice/GnreResultadoLote"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } diff --git a/testes/Sefaz/LoteTest.php b/testes/Sefaz/LoteTest.php index b535ce3..721debe 100644 --- a/testes/Sefaz/LoteTest.php +++ b/testes/Sefaz/LoteTest.php @@ -17,7 +17,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $lote = new Lote(); $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } @@ -323,7 +323,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebServiceDetes $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } diff --git a/wsdl/GnreLoteResultado.wsdl b/wsdl/GnreLoteResultado.wsdl index 5ebdb82..99a562a 100755 --- a/wsdl/GnreLoteResultado.wsdl +++ b/wsdl/GnreLoteResultado.wsdl @@ -1,10 +1,10 @@ - + xmlns:tns="https://www.gnre.pe.gov.br/webservice/GnreResultadoLote" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - + @@ -47,7 +47,7 @@ diff --git a/wsdl/GnreRecepcaoLote.wsdl b/wsdl/GnreRecepcaoLote.wsdl index de5337b..7aea86d 100755 --- a/wsdl/GnreRecepcaoLote.wsdl +++ b/wsdl/GnreRecepcaoLote.wsdl @@ -1,9 +1,9 @@ - + xmlns:tns="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - + @@ -45,7 +45,7 @@ - diff --git a/xsd/v1/config_uf_v1.00.xsd b/xsd/v1/config_uf_v1.00.xsd index 159b97e..fc6e78c 100755 --- a/xsd/v1/config_uf_v1.00.xsd +++ b/xsd/v1/config_uf_v1.00.xsd @@ -1,7 +1,7 @@ - + xmlns:tns="https://www.gnre.pe.gov.br"> diff --git a/xsd/v1/consulta_config_uf_v1.00.xsd b/xsd/v1/consulta_config_uf_v1.00.xsd index a3e5ec2..7e5b6f8 100755 --- a/xsd/v1/consulta_config_uf_v1.00.xsd +++ b/xsd/v1/consulta_config_uf_v1.00.xsd @@ -1,7 +1,7 @@ - + xmlns:tns="https://www.gnre.pe.gov.br"> diff --git a/xsd/v1/lote_gnre_consulta_v1.00.xsd b/xsd/v1/lote_gnre_consulta_v1.00.xsd index 97c6f4a..7e25860 100755 --- a/xsd/v1/lote_gnre_consulta_v1.00.xsd +++ b/xsd/v1/lote_gnre_consulta_v1.00.xsd @@ -1,9 +1,9 @@ - + xmlns="https://www.gnre.pe.gov.br" > diff --git a/xsd/v1/lote_gnre_recibo_v1.00.xsd b/xsd/v1/lote_gnre_recibo_v1.00.xsd index 2f59bec..88456a6 100755 --- a/xsd/v1/lote_gnre_recibo_v1.00.xsd +++ b/xsd/v1/lote_gnre_recibo_v1.00.xsd @@ -1,9 +1,9 @@ - + xmlns="https://www.gnre.pe.gov.br" > diff --git a/xsd/v1/lote_gnre_result_v1.00.xsd b/xsd/v1/lote_gnre_result_v1.00.xsd index 6004622..cbecac9 100755 --- a/xsd/v1/lote_gnre_result_v1.00.xsd +++ b/xsd/v1/lote_gnre_result_v1.00.xsd @@ -1,9 +1,9 @@ - + xmlns="https://www.gnre.pe.gov.br" > diff --git a/xsd/v1/lote_gnre_v1.00.xsd b/xsd/v1/lote_gnre_v1.00.xsd index 951f0c9..19b7068 100755 --- a/xsd/v1/lote_gnre_v1.00.xsd +++ b/xsd/v1/lote_gnre_v1.00.xsd @@ -1,555 +1,556 @@ - - - - - - - - - - - - - - - - Código da UF - Favorecida. - (Utilizar a Tabela - do IBGE) - - - - - - - Código da Receita. - - - - - - - - - - - - - Código do - Detalhamento da - Receita. - - - - - - - - - - - - - Código do Produto. - - - - - - - - - - - - - Código do Tipo de - Identificação do - Emitente: - - - - - - - Número do Documento - de Identificação do - Contribuinte - Emitente. - - - - - - - - Número - do CNPJ - do - Contribuinte - - - - - - - Número - do CPF - do - Contribuinte - - - - - - - - - - Código do Tipo de - Documento de Origem. - - - - - - - - - - - - - Número do Documento - de Origem. - - - - - - - - - - - - - Valor Original da - Guia. - - - - - - - Valor total da guia - (valor original + - encargos). - - - - - - - Data de vencimento - da guia. - - - - - - - Número do convênio. - - - - - - - - - - - - Nome da firma ou a - Razão Social do - Contribuinte. - - - - - - - - - - - - Inscrição Estadual - do Contribuinte na - UF favorecida. - - - - - - - Endereço do - Contribuinte. - - - - - - - - - - - - Código do Município - de localização do - Contribuinte.(Utilizar - a tabela do IBGE) - - - - - - - Código da UF do - Contribuinte. - - - - - - - CEP do Contribuinte. - - - - - - - - - - - - - Telefone do - contribuinte. - - - - - - - - - - - - - Tipo de - Identificação do - Destinatário: - - - - - - - Número do Documento - de Identificação do - Contribuinte - Destinatário. - - - - - - - - Número - do CNPJ - do - Contribuinte - Destinatário - - - - - - - Número - do CPF - do - Contribuinte - Destinatário - - - - - - - - - - Inscrição Estadual - do Contribuinte na - UF favorecida. - - - - - - - Nome da firma ou a - Razão Social do - Contribuinte. - - - - - - - - - - - - Código do Município - de Destino.(Utilizar - a tabela do IBGE) - - - - - - - Data prevista de - pagamento informada - pelo contribuinte. - - - - - - - - Informações de - período de - apuração - - - - - - - Indicador - do - Periodo: - 0 – - mensal; - 1 – 1a. - quinzena; - 2 – 2a. - quinzena; - 3 – 1o. - decêndio; - 4 – 2o. - decêndio; - 5 – 3o. - decêndio; - - - - - - - - - - - - - - - - - - Mês de - referência - da - Apuração - - - - - - - Ano de - referência - da - Apuração - - - - - - - Parcela - de - referência - da - Apuração - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Código da UF + Favorecida. + (Utilizar a Tabela + do IBGE) + + + + + + + Código da Receita. + + + + + + + + + + + + + Código do + Detalhamento da + Receita. + + + + + + + + + + + + + Código do Produto. + + + + + + + + + + + + + Código do Tipo de + Identificação do + Emitente: + + + + + + + Número do Documento + de Identificação do + Contribuinte + Emitente. + + + + + + + + Número + do CNPJ + do + Contribuinte + + + + + + + Número + do CPF + do + Contribuinte + + + + + + + + + + Código do Tipo de + Documento de Origem. + + + + + + + + + + + + + Número do Documento + de Origem. + + + + + + + + + + + + + Valor Original da + Guia. + + + + + + + Valor total da guia + (valor original + + encargos). + + + + + + + Data de vencimento + da guia. + + + + + + + Número do convênio. + + + + + + + + + + + + Nome da firma ou a + Razão Social do + Contribuinte. + + + + + + + + + + + + Inscrição Estadual + do Contribuinte na + UF favorecida. + + + + + + + Endereço do + Contribuinte. + + + + + + + + + + + + Código do Município + de localização do + Contribuinte.(Utilizar + a tabela do IBGE) + + + + + + + Código da UF do + Contribuinte. + + + + + + + CEP do Contribuinte. + + + + + + + + + + + + + Telefone do + contribuinte. + + + + + + + + + + + + + Tipo de + Identificação do + Destinatário: + + + + + + + Número do Documento + de Identificação do + Contribuinte + Destinatário. + + + + + + + + Número + do CNPJ + do + Contribuinte + Destinatário + + + + + + + Número + do CPF + do + Contribuinte + Destinatário + + + + + + + + + + Inscrição Estadual + do Contribuinte na + UF favorecida. + + + + + + + Nome da firma ou a + Razão Social do + Contribuinte. + + + + + + + + + + + + Código do Município + de Destino.(Utilizar + a tabela do IBGE) + + + + + + + Data prevista de + pagamento informada + pelo contribuinte. + + + + + + + + Informações de + período de + apuração + + + + + + + Indicador + do + Periodo: + 0 – + mensal; + 1 – 1a. + quinzena; + 2 – 2a. + quinzena; + 3 – 1o. + decêndio; + 4 – 2o. + decêndio; + 5 – 3o. + decêndio; + + + + + + + + + + + + + + + + + + Mês de + referência + da + Apuração + + + + + + + Ano de + referência + da + Apuração + + + + + + + Parcela + de + referência + da + Apuração + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/xsd/v1/tiposBasicoGNRE_v1.00.xsd b/xsd/v1/tiposBasicoGNRE_v1.00.xsd index d1f3847..b7bce9a 100755 --- a/xsd/v1/tiposBasicoGNRE_v1.00.xsd +++ b/xsd/v1/tiposBasicoGNRE_v1.00.xsd @@ -2,7 +2,7 @@ diff --git a/xsd/v2/dados_gnre_v2.00.xsd b/xsd/v2/dados_gnre_v2.00.xsd index 31e063e..22442c2 100644 --- a/xsd/v2/dados_gnre_v2.00.xsd +++ b/xsd/v2/dados_gnre_v2.00.xsd @@ -1,10 +1,10 @@ - - + - 0 - GNRE Simples -1 - GNRE Multiplos Doc. de Origem + 0 - GNRE Simples +1 - GNRE Multiplos Doc. de Origem 2 - GNRE Multiplas Receitas diff --git a/xsd/v2/lote_gnre_result_v2.00.xsd b/xsd/v2/lote_gnre_result_v2.00.xsd index faa115f..13f23d7 100644 --- a/xsd/v2/lote_gnre_result_v2.00.xsd +++ b/xsd/v2/lote_gnre_result_v2.00.xsd @@ -1,9 +1,9 @@ - + xmlns="https://www.gnre.pe.gov.br" > diff --git a/xsd/v2/lote_gnre_v2.00.xsd b/xsd/v2/lote_gnre_v2.00.xsd index a5677ae..c9ed12f 100644 --- a/xsd/v2/lote_gnre_v2.00.xsd +++ b/xsd/v2/lote_gnre_v2.00.xsd @@ -1,8 +1,8 @@ - diff --git a/xsd/v2/tiposBasicoGNRE_v2.00.xsd b/xsd/v2/tiposBasicoGNRE_v2.00.xsd index 8e6c630..688c47f 100644 --- a/xsd/v2/tiposBasicoGNRE_v2.00.xsd +++ b/xsd/v2/tiposBasicoGNRE_v2.00.xsd @@ -2,9 +2,9 @@ - + targetNamespace="https://www.gnre.pe.gov.br" + xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:Q1="https://www.gnre.pe.gov.br"> + @@ -23,7 +23,7 @@ maxOccurs="1"> - + From 59bfd1079b8ed14f663ecc3944cbec68a6a62bcc Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Wed, 22 Nov 2023 16:54:35 -0300 Subject: [PATCH 07/13] GNRE --- exemplos/xml/envelope-consulta-config-uf.xml | 2 +- exemplos/xml/envelope-consultar-gnre.xml | 6 +++--- exemplos/xml/estrutura-lote-completo-gnre.xml | 6 +++--- .../xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml | 6 +++--- .../xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml | 6 +++--- exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml | 6 +++--- ...emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml | 6 +++--- .../xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml | 6 +++--- exemplos/xml/resultado-consulta-gnre.xml | 4 ++-- lib/Sped/Gnre/Helper/GnreHelper.php | 9 ++++++--- xsd/v1/lote_gnre_consulta_v1.00.xsd | 2 +- xsd/v1/lote_gnre_recibo_v1.00.xsd | 2 +- xsd/v1/lote_gnre_result_v1.00.xsd | 2 +- xsd/v1/lote_gnre_v1.00.xsd | 2 +- xsd/v2/dados_gnre_v2.00.xsd | 4 ++-- xsd/v2/lote_gnre_result_v2.00.xsd | 2 +- xsd/v2/lote_gnre_v2.00.xsd | 2 +- xsd/v2/tiposBasicoGNRE_v2.00.xsd | 2 +- 18 files changed, 39 insertions(+), 36 deletions(-) diff --git a/exemplos/xml/envelope-consulta-config-uf.xml b/exemplos/xml/envelope-consulta-config-uf.xml index 50ec079..e05d6f3 100644 --- a/exemplos/xml/envelope-consulta-config-uf.xml +++ b/exemplos/xml/envelope-consulta-config-uf.xml @@ -7,7 +7,7 @@ - + 1 PR 100099 diff --git a/exemplos/xml/envelope-consultar-gnre.xml b/exemplos/xml/envelope-consultar-gnre.xml index 2bfa475..d2fae69 100644 --- a/exemplos/xml/envelope-consultar-gnre.xml +++ b/exemplos/xml/envelope-consultar-gnre.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 12345678 123 diff --git a/exemplos/xml/estrutura-lote-completo-gnre.xml b/exemplos/xml/estrutura-lote-completo-gnre.xml index 0c248a4..fa409a3 100755 --- a/exemplos/xml/estrutura-lote-completo-gnre.xml +++ b/exemplos/xml/estrutura-lote-completo-gnre.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml b/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml index 5f35fc5..65c2a13 100644 --- a/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml +++ b/exemplos/xml/lote-emit-cnpj-dest-cnpj-sem-campos-extras.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml index 835ab54..d956532 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-campos-extras.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml index b8ed129..e46a37d 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-cep-emitente.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml index e39339c..c3f5b92 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-inscricao-estadual-emitente.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml index 49e119d..7599898 100644 --- a/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml +++ b/exemplos/xml/lote-emit-cpf-dest-cpf-sem-telefone-emitente.xml @@ -1,13 +1,13 @@ - + 1.00 - - + + 26 diff --git a/exemplos/xml/resultado-consulta-gnre.xml b/exemplos/xml/resultado-consulta-gnre.xml index ef29c72..23394e2 100644 --- a/exemplos/xml/resultado-consulta-gnre.xml +++ b/exemplos/xml/resultado-consulta-gnre.xml @@ -1,8 +1,8 @@ - - + + 1 0000000000 diff --git a/lib/Sped/Gnre/Helper/GnreHelper.php b/lib/Sped/Gnre/Helper/GnreHelper.php index 0894c37..2319ccc 100644 --- a/lib/Sped/Gnre/Helper/GnreHelper.php +++ b/lib/Sped/Gnre/Helper/GnreHelper.php @@ -55,12 +55,15 @@ public static function getGuiaGnre($xmlNf): Guia $xml = self::parseNf($xmlNf); $guia = new Guia(); $guia->c04_docOrigem = $xml->NrNf; - $guia->c28_tipoDocOrigem = $xml->TipoDoc; + //$guia->c28_tipoDocOrigem = $xml->TipoDoc; + $guia->c28_tipoDocOrigem = 10; $guia->c21_cepEmitente = $xml->CEPEmpresa; $guia->c16_razaoSocialEmitente = $xml->NmEmpresa; $guia->c03_idContribuinteEmitente = $xml->NrDocumentoEmpresa; $guia->c18_enderecoEmitente = $xml->EnderecoEmpresa; - $guia->c19_municipioEmitente = $xml->MunicipioEmpresa; + + $guia->c19_municipioEmitente = $xml->CdMunicipioEmpresa; + $guia->c20_ufEnderecoEmitente = $xml->UfEmpresa; $guia->c17_inscricaoEstadualEmitente = $xml->NrIEEmpresa; $guia->c22_telefoneEmitente = $xml->TelefoneEmpresa; @@ -68,7 +71,7 @@ public static function getGuiaGnre($xmlNf): Guia $guia->c35_idContribuinteDestinatario = $xml->NrDocumentoCliente; $guia->c36_inscricaoEstadualDestinatario = $xml->NrIECliente; $guia->c37_razaoSocialDestinatario = $xml->NmCliente; - $guia->c38_municipioDestinatario = $xml->MunicipioCliente; + $guia->c38_municipioDestinatario = $xml->CdMunicipioCliente; return $guia; } diff --git a/xsd/v1/lote_gnre_consulta_v1.00.xsd b/xsd/v1/lote_gnre_consulta_v1.00.xsd index 7e25860..3a14891 100755 --- a/xsd/v1/lote_gnre_consulta_v1.00.xsd +++ b/xsd/v1/lote_gnre_consulta_v1.00.xsd @@ -3,7 +3,7 @@ elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns="https://www.gnre.pe.gov.br" > + xmlns="http://www.gnre.pe.gov.br" > diff --git a/xsd/v1/lote_gnre_recibo_v1.00.xsd b/xsd/v1/lote_gnre_recibo_v1.00.xsd index 88456a6..e6443c5 100755 --- a/xsd/v1/lote_gnre_recibo_v1.00.xsd +++ b/xsd/v1/lote_gnre_recibo_v1.00.xsd @@ -3,7 +3,7 @@ elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns="https://www.gnre.pe.gov.br" > + xmlns="http://www.gnre.pe.gov.br" > diff --git a/xsd/v1/lote_gnre_result_v1.00.xsd b/xsd/v1/lote_gnre_result_v1.00.xsd index cbecac9..ab3ebf4 100755 --- a/xsd/v1/lote_gnre_result_v1.00.xsd +++ b/xsd/v1/lote_gnre_result_v1.00.xsd @@ -3,7 +3,7 @@ elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns="https://www.gnre.pe.gov.br" > + xmlns="http://www.gnre.pe.gov.br" > diff --git a/xsd/v1/lote_gnre_v1.00.xsd b/xsd/v1/lote_gnre_v1.00.xsd index 19b7068..6030aa1 100755 --- a/xsd/v1/lote_gnre_v1.00.xsd +++ b/xsd/v1/lote_gnre_v1.00.xsd @@ -2,7 +2,7 @@ diff --git a/xsd/v2/dados_gnre_v2.00.xsd b/xsd/v2/dados_gnre_v2.00.xsd index 22442c2..65aff65 100644 --- a/xsd/v2/dados_gnre_v2.00.xsd +++ b/xsd/v2/dados_gnre_v2.00.xsd @@ -1,10 +1,10 @@ - - + + xmlns="http://www.gnre.pe.gov.br" > diff --git a/xsd/v2/lote_gnre_v2.00.xsd b/xsd/v2/lote_gnre_v2.00.xsd index c9ed12f..7aef0d8 100644 --- a/xsd/v2/lote_gnre_v2.00.xsd +++ b/xsd/v2/lote_gnre_v2.00.xsd @@ -2,7 +2,7 @@ diff --git a/xsd/v2/tiposBasicoGNRE_v2.00.xsd b/xsd/v2/tiposBasicoGNRE_v2.00.xsd index 688c47f..f62fc5f 100644 --- a/xsd/v2/tiposBasicoGNRE_v2.00.xsd +++ b/xsd/v2/tiposBasicoGNRE_v2.00.xsd @@ -4,7 +4,7 @@ elementFormDefault="qualified" targetNamespace="https://www.gnre.pe.gov.br" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:Q1="https://www.gnre.pe.gov.br"> - + From 267cd8eaa1dbd3364ce1d14e146012c05702b80e Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Wed, 22 Nov 2023 17:02:56 -0300 Subject: [PATCH 08/13] Teste --- lib/Sped/Gnre/Helper/GnreHelper.php | 4 ++-- lib/Sped/Gnre/Sefaz/ConfigUf.php | 2 +- lib/Sped/Gnre/Sefaz/Consulta.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Sped/Gnre/Helper/GnreHelper.php b/lib/Sped/Gnre/Helper/GnreHelper.php index 2319ccc..86a690e 100644 --- a/lib/Sped/Gnre/Helper/GnreHelper.php +++ b/lib/Sped/Gnre/Helper/GnreHelper.php @@ -62,7 +62,7 @@ public static function getGuiaGnre($xmlNf): Guia $guia->c03_idContribuinteEmitente = $xml->NrDocumentoEmpresa; $guia->c18_enderecoEmitente = $xml->EnderecoEmpresa; - $guia->c19_municipioEmitente = $xml->CdMunicipioEmpresa; + $guia->c19_municipioEmitente = 15004;//$xml->CdMunicipioEmpresa; $guia->c20_ufEnderecoEmitente = $xml->UfEmpresa; $guia->c17_inscricaoEstadualEmitente = $xml->NrIEEmpresa; @@ -71,7 +71,7 @@ public static function getGuiaGnre($xmlNf): Guia $guia->c35_idContribuinteDestinatario = $xml->NrDocumentoCliente; $guia->c36_inscricaoEstadualDestinatario = $xml->NrIECliente; $guia->c37_razaoSocialDestinatario = $xml->NmCliente; - $guia->c38_municipioDestinatario = $xml->CdMunicipioCliente; + $guia->c38_municipioDestinatario = 06200;//$xml->CdMunicipioCliente; return $guia; } diff --git a/lib/Sped/Gnre/Sefaz/ConfigUf.php b/lib/Sped/Gnre/Sefaz/ConfigUf.php index c4794ce..27da62d 100644 --- a/lib/Sped/Gnre/Sefaz/ConfigUf.php +++ b/lib/Sped/Gnre/Sefaz/ConfigUf.php @@ -72,7 +72,7 @@ public function toXml() $gnre->preserveWhiteSpace = false; $consulta = $gnre->createElement('TConsultaConfigUf'); - $consulta->setAttribute('xmlns', 'https://www.gnre.pe.gov.br'); + $consulta->setAttribute('xmlns', 'http://www.gnre.pe.gov.br'); $ambiente = $gnre->createElement('ambiente', $this->getEnvironment()); $estado = $gnre->createElement('uf', $this->getEstado()); diff --git a/lib/Sped/Gnre/Sefaz/Consulta.php b/lib/Sped/Gnre/Sefaz/Consulta.php index 111d70a..c87de23 100644 --- a/lib/Sped/Gnre/Sefaz/Consulta.php +++ b/lib/Sped/Gnre/Sefaz/Consulta.php @@ -71,7 +71,7 @@ public function toXml() $gnre->preserveWhiteSpace = false; $consulta = $gnre->createElement('TConsLote_GNRE'); - $consulta->setAttribute('xmlns', 'https://www.gnre.pe.gov.br'); + $consulta->setAttribute('xmlns', 'http://www.gnre.pe.gov.br'); $ambiente = $gnre->createElement('ambiente', $this->getEnvironment()); $numeroRecibo = $gnre->createElement('numeroRecibo', $this->getRecibo()); From e2780b3d7e234192b7af1059bd6802ac168cf1fe Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Wed, 22 Nov 2023 17:13:27 -0300 Subject: [PATCH 09/13] HTTP --- exemplos/xml/envelope-consulta-config-uf.xml | 2 +- lib/Sped/Gnre/Helper/GnreHelper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exemplos/xml/envelope-consulta-config-uf.xml b/exemplos/xml/envelope-consulta-config-uf.xml index e05d6f3..a943235 100644 --- a/exemplos/xml/envelope-consulta-config-uf.xml +++ b/exemplos/xml/envelope-consulta-config-uf.xml @@ -1,5 +1,5 @@ - + 1.00 diff --git a/lib/Sped/Gnre/Helper/GnreHelper.php b/lib/Sped/Gnre/Helper/GnreHelper.php index 86a690e..fcce7fa 100644 --- a/lib/Sped/Gnre/Helper/GnreHelper.php +++ b/lib/Sped/Gnre/Helper/GnreHelper.php @@ -71,7 +71,7 @@ public static function getGuiaGnre($xmlNf): Guia $guia->c35_idContribuinteDestinatario = $xml->NrDocumentoCliente; $guia->c36_inscricaoEstadualDestinatario = $xml->NrIECliente; $guia->c37_razaoSocialDestinatario = $xml->NmCliente; - $guia->c38_municipioDestinatario = 06200;//$xml->CdMunicipioCliente; + $guia->c38_municipioDestinatario = '06200';//$xml->CdMunicipioCliente; return $guia; } From a78bc11a026c122c529a04e6d87afbe104dc4ece Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Wed, 22 Nov 2023 17:20:06 -0300 Subject: [PATCH 10/13] HTTP --- exemplos/xml/resultado-consulta-gnre.xml | 2 +- lib/Sped/Gnre/Sefaz/ConfigUf.php | 2 +- lib/Sped/Gnre/Sefaz/Consulta.php | 2 +- lib/Sped/Gnre/Sefaz/Lote.php | 4 ++-- lib/Sped/Gnre/Sefaz/LoteV2.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exemplos/xml/resultado-consulta-gnre.xml b/exemplos/xml/resultado-consulta-gnre.xml index 23394e2..0223729 100644 --- a/exemplos/xml/resultado-consulta-gnre.xml +++ b/exemplos/xml/resultado-consulta-gnre.xml @@ -2,7 +2,7 @@ - + 1 0000000000 diff --git a/lib/Sped/Gnre/Sefaz/ConfigUf.php b/lib/Sped/Gnre/Sefaz/ConfigUf.php index 27da62d..d39debb 100644 --- a/lib/Sped/Gnre/Sefaz/ConfigUf.php +++ b/lib/Sped/Gnre/Sefaz/ConfigUf.php @@ -95,7 +95,7 @@ public function getSoapEnvelop($gnre, $consulta) { $soapEnv = $gnre->createElement('soap12:Envelope'); $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); - $soapEnv->setAttribute('xmlns:gnr', 'https://www.gnre.pe.gov.br/webservice/GnreConfigUF'); + $soapEnv->setAttribute('xmlns:gnr', 'http://www.gnre.pe.gov.br/webservice/GnreConfigUF'); $gnreCabecalhoSoap = $gnre->createElement('gnr:gnreCabecMsg'); $gnreCabecalhoSoap->appendChild($gnre->createElement('gnr:versaoDados', '1.00')); diff --git a/lib/Sped/Gnre/Sefaz/Consulta.php b/lib/Sped/Gnre/Sefaz/Consulta.php index c87de23..a07b6ab 100644 --- a/lib/Sped/Gnre/Sefaz/Consulta.php +++ b/lib/Sped/Gnre/Sefaz/Consulta.php @@ -95,7 +95,7 @@ public function getSoapEnvelop($gnre, $consulta) $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); $gnreCabecalhoSoap = $gnre->createElement('gnreCabecMsg'); - $gnreCabecalhoSoap->setAttribute('xmlns', 'https://www.gnre.pe.gov.br/wsdl/consultar'); + $gnreCabecalhoSoap->setAttribute('xmlns', 'http://www.gnre.pe.gov.br/wsdl/consultar'); $gnreCabecalhoSoap->appendChild($gnre->createElement('versaoDados', '1.00')); $soapHeader = $gnre->createElement('soap12:Header'); diff --git a/lib/Sped/Gnre/Sefaz/Lote.php b/lib/Sped/Gnre/Sefaz/Lote.php index 8a2b91e..1723a04 100755 --- a/lib/Sped/Gnre/Sefaz/Lote.php +++ b/lib/Sped/Gnre/Sefaz/Lote.php @@ -101,7 +101,7 @@ public function toXml() $loteGnre = $gnre->createElement('TLote_GNRE'); $loteXmlns = $gnre->createAttribute('xmlns'); - $loteXmlns->value = 'https://www.gnre.pe.gov.br'; + $loteXmlns->value = 'http://www.gnre.pe.gov.br'; $loteGnre->appendChild($loteXmlns); $guia = $gnre->createElement('guias'); @@ -255,7 +255,7 @@ public function getSoapEnvelop($gnre, $loteGnre) $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); $gnreCabecalhoSoap = $gnre->createElement('gnreCabecMsg'); - $gnreCabecalhoSoap->setAttribute('xmlns', 'https://www.gnre.pe.gov.br/wsdl/processar'); + $gnreCabecalhoSoap->setAttribute('xmlns', 'http://www.gnre.pe.gov.br/wsdl/processar'); $gnreCabecalhoSoap->appendChild($gnre->createElement('versaoDados', '1.00')); $soapHeader = $gnre->createElement('soap12:Header'); diff --git a/lib/Sped/Gnre/Sefaz/LoteV2.php b/lib/Sped/Gnre/Sefaz/LoteV2.php index 3dba9c5..62b88f4 100644 --- a/lib/Sped/Gnre/Sefaz/LoteV2.php +++ b/lib/Sped/Gnre/Sefaz/LoteV2.php @@ -41,7 +41,7 @@ public function getSoapEnvelop($gnre, $loteGnre) $soapEnv->setAttribute('xmlns:soap12', 'http://www.w3.org/2003/05/soap-envelope'); $gnreCabecalhoSoap = $gnre->createElement('gnreCabecMsg'); - $gnreCabecalhoSoap->setAttribute('xmlns', 'https://www.gnre.pe.gov.br/wsdl/processar'); + $gnreCabecalhoSoap->setAttribute('xmlns', 'http://www.gnre.pe.gov.br/wsdl/processar'); $gnreCabecalhoSoap->appendChild($gnre->createElement('versaoDados', '2.00')); $soapHeader = $gnre->createElement('soap12:Header'); @@ -73,7 +73,7 @@ public function toXml() { $loteGnre = $gnre->createElement('TLote_GNRE'); $loteXmlns = $gnre->createAttribute('xmlns'); - $loteXmlns->value = 'https://www.gnre.pe.gov.br'; + $loteXmlns->value = 'http://www.gnre.pe.gov.br'; $loteVersao = $gnre->createAttribute('versao'); $loteVersao->value = '2.00'; From 52ce2451b19b7bfbc5d17abaf3673f16cc4df8c0 Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Mon, 27 Nov 2023 16:03:43 -0300 Subject: [PATCH 11/13] GNRE --- lib/Sped/Gnre/Sefaz/ConfigUf.php | 6 +++--- lib/Sped/Gnre/Sefaz/Consulta.php | 10 +++++----- lib/Sped/Gnre/Sefaz/Lote.php | 10 +++++----- lib/Sped/Gnre/Sefaz/LoteV2.php | 4 ++-- testes/Sefaz/ConfigUfTest.php | 6 +++--- testes/Sefaz/ConsultaTest.php | 6 +++--- testes/Sefaz/LoteTest.php | 6 +++--- wsdl/GnreLoteResultado.wsdl | 8 ++++---- wsdl/GnreRecepcaoLote.wsdl | 8 ++++---- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/Sped/Gnre/Sefaz/ConfigUf.php b/lib/Sped/Gnre/Sefaz/ConfigUf.php index d39debb..3bc1e17 100644 --- a/lib/Sped/Gnre/Sefaz/ConfigUf.php +++ b/lib/Sped/Gnre/Sefaz/ConfigUf.php @@ -41,8 +41,8 @@ class ConfigUf extends ConsultaConfigUf public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/webservice/GnreConfigUF' : - 'https://www.gnre.pe.gov.br/webservice/GnreConfigUF'; + 'http://www.testegnre.pe.gov.br/webservice/GnreConfigUF' : + 'http://www.gnre.pe.gov.br/webservice/GnreConfigUF'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -57,7 +57,7 @@ public function getHeaderSoap() public function soapAction() { return $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF' : + 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF' : 'https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'; } diff --git a/lib/Sped/Gnre/Sefaz/Consulta.php b/lib/Sped/Gnre/Sefaz/Consulta.php index a07b6ab..539687d 100644 --- a/lib/Sped/Gnre/Sefaz/Consulta.php +++ b/lib/Sped/Gnre/Sefaz/Consulta.php @@ -42,8 +42,8 @@ class Consulta extends ConsultaGnre public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : - 'https://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; + 'http://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : + 'http://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -57,7 +57,7 @@ public function getHeaderSoap() public function soapAction() { return $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote' : + 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote' : 'https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; } @@ -105,8 +105,8 @@ public function getSoapEnvelop($gnre, $consulta) $gnre->appendChild($soapEnv); $action = $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : - 'https://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; + 'http://www.testegnre.pe.gov.br/webservice/GnreResultadoLote' : + 'http://www.gnre.pe.gov.br/webservice/GnreResultadoLote'; $gnreDadosMsg = $gnre->createElement('gnreDadosMsg'); $gnreDadosMsg->setAttribute('xmlns', $action); diff --git a/lib/Sped/Gnre/Sefaz/Lote.php b/lib/Sped/Gnre/Sefaz/Lote.php index 1723a04..4c7aa54 100755 --- a/lib/Sped/Gnre/Sefaz/Lote.php +++ b/lib/Sped/Gnre/Sefaz/Lote.php @@ -71,8 +71,8 @@ public function setEstadoFactory(EstadoFactory $estadoFactory) public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -86,7 +86,7 @@ public function getHeaderSoap() public function soapAction() { return $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao' : + 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao' : 'https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao'; } @@ -265,8 +265,8 @@ public function getSoapEnvelop($gnre, $loteGnre) $gnre->appendChild($soapEnv); $action = $this->ambienteDeTeste ? - 'https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; $gnreDadosMsg = $gnre->createElement('gnreDadosMsg'); $gnreDadosMsg->setAttribute('xmlns', $action); diff --git a/lib/Sped/Gnre/Sefaz/LoteV2.php b/lib/Sped/Gnre/Sefaz/LoteV2.php index 62b88f4..a4fbf2a 100644 --- a/lib/Sped/Gnre/Sefaz/LoteV2.php +++ b/lib/Sped/Gnre/Sefaz/LoteV2.php @@ -51,8 +51,8 @@ public function getSoapEnvelop($gnre, $loteGnre) $gnre->appendChild($soapEnv); $action = $this->ambienteDeTesteV2 ? - 'https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : + 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; $gnreDadosMsg = $gnre->createElement('gnreDadosMsg'); $gnreDadosMsg->setAttribute('xmlns', $action); diff --git a/testes/Sefaz/ConfigUfTest.php b/testes/Sefaz/ConfigUfTest.php index 4256e41..55397b5 100644 --- a/testes/Sefaz/ConfigUfTest.php +++ b/testes/Sefaz/ConfigUfTest.php @@ -15,7 +15,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.gnre.pe.gov.br/webservice/GnreConfigUF"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreConfigUF"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } @@ -27,7 +27,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebserviceDeTes $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.testegnre.pe.gov.br/webservice/GnreConfigUF"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreConfigUF"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } @@ -63,6 +63,6 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); $consulta->utilizarAmbienteDeTeste(true); - $this->assertEquals($consulta->soapAction(), 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF'); + $this->assertEquals($consulta->soapAction(), 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF'); } } diff --git a/testes/Sefaz/ConsultaTest.php b/testes/Sefaz/ConsultaTest.php index 566eb0d..de17788 100644 --- a/testes/Sefaz/ConsultaTest.php +++ b/testes/Sefaz/ConsultaTest.php @@ -15,7 +15,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $consulta = new \Sped\Gnre\Sefaz\Consulta(); $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.gnre.pe.gov.br/webservice/GnreResultadoLote"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreResultadoLote"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } @@ -27,7 +27,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebserviceDeTes $headersArray = $consulta->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.testegnre.pe.gov.br/webservice/GnreResultadoLote"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreResultadoLote"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: consultar', $headersArray[1]); } @@ -62,7 +62,7 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() $consulta = new \Sped\Gnre\Sefaz\Consulta(); $consulta->utilizarAmbienteDeTeste(true); - $action = 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; + $action = 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; $this->assertEquals($consulta->soapAction(), $action); } } diff --git a/testes/Sefaz/LoteTest.php b/testes/Sefaz/LoteTest.php index 721debe..3e212cb 100644 --- a/testes/Sefaz/LoteTest.php +++ b/testes/Sefaz/LoteTest.php @@ -17,7 +17,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $lote = new Lote(); $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } @@ -313,7 +313,7 @@ public function testDeveUtilizarOAmbienteDeTestesAoEnviarUmLoteParaOwebService() { $lote = new Lote(); $lote->utilizarAmbienteDeTeste(true); - $this->assertEquals('https://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); + $this->assertEquals('http://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); } public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebServiceDeteste() @@ -323,7 +323,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebServiceDetes $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="https://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } diff --git a/wsdl/GnreLoteResultado.wsdl b/wsdl/GnreLoteResultado.wsdl index 99a562a..5ebdb82 100755 --- a/wsdl/GnreLoteResultado.wsdl +++ b/wsdl/GnreLoteResultado.wsdl @@ -1,10 +1,10 @@ - + xmlns:tns="http://www.gnre.pe.gov.br/webservice/GnreResultadoLote" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - + @@ -47,7 +47,7 @@ diff --git a/wsdl/GnreRecepcaoLote.wsdl b/wsdl/GnreRecepcaoLote.wsdl index 7aea86d..de5337b 100755 --- a/wsdl/GnreRecepcaoLote.wsdl +++ b/wsdl/GnreRecepcaoLote.wsdl @@ -1,9 +1,9 @@ - + xmlns:tns="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> - + @@ -45,7 +45,7 @@ - From 41770caba2b8c2d5e99dbef2fc6dc8de372565c6 Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Mon, 27 Nov 2023 16:05:07 -0300 Subject: [PATCH 12/13] GNRE --- lib/Sped/Gnre/Sefaz/ConfigUf.php | 2 +- lib/Sped/Gnre/Sefaz/Consulta.php | 2 +- lib/Sped/Gnre/Sefaz/Lote.php | 2 +- testes/Sefaz/ConfigUfTest.php | 4 ++-- testes/Sefaz/ConsultaTest.php | 4 ++-- testes/Sefaz/LoteTest.php | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Sped/Gnre/Sefaz/ConfigUf.php b/lib/Sped/Gnre/Sefaz/ConfigUf.php index 3bc1e17..f7cacde 100644 --- a/lib/Sped/Gnre/Sefaz/ConfigUf.php +++ b/lib/Sped/Gnre/Sefaz/ConfigUf.php @@ -58,7 +58,7 @@ public function soapAction() { return $this->ambienteDeTeste ? 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF' : - 'https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'; + 'http://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'; } /** diff --git a/lib/Sped/Gnre/Sefaz/Consulta.php b/lib/Sped/Gnre/Sefaz/Consulta.php index 539687d..184b957 100644 --- a/lib/Sped/Gnre/Sefaz/Consulta.php +++ b/lib/Sped/Gnre/Sefaz/Consulta.php @@ -58,7 +58,7 @@ public function soapAction() { return $this->ambienteDeTeste ? 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote' : - 'https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; + 'http://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; } /** diff --git a/lib/Sped/Gnre/Sefaz/Lote.php b/lib/Sped/Gnre/Sefaz/Lote.php index 4c7aa54..88d5011 100755 --- a/lib/Sped/Gnre/Sefaz/Lote.php +++ b/lib/Sped/Gnre/Sefaz/Lote.php @@ -87,7 +87,7 @@ public function soapAction() { return $this->ambienteDeTeste ? 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao' : - 'https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao'; + 'http://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao'; } /** diff --git a/testes/Sefaz/ConfigUfTest.php b/testes/Sefaz/ConfigUfTest.php index 55397b5..ada8430 100644 --- a/testes/Sefaz/ConfigUfTest.php +++ b/testes/Sefaz/ConfigUfTest.php @@ -36,7 +36,7 @@ public function testDeveRetornarAacaoAserExecutadaNoSoap() { $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); - $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF', $consulta->soapAction()); + $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF', $consulta->soapAction()); } public function testDeveRetornarXmlCompletoVazioParaRealizarAconsulta() @@ -55,7 +55,7 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeProducao() { $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); - $this->assertEquals($consulta->soapAction(), 'https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'); + $this->assertEquals($consulta->soapAction(), 'http://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'); } public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() diff --git a/testes/Sefaz/ConsultaTest.php b/testes/Sefaz/ConsultaTest.php index de17788..933f504 100644 --- a/testes/Sefaz/ConsultaTest.php +++ b/testes/Sefaz/ConsultaTest.php @@ -36,7 +36,7 @@ public function testDeveRetornarAacaoAserExecutadaNoSoap() { $consulta = new \Sped\Gnre\Sefaz\Consulta(); - $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote', $consulta->soapAction()); + $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote', $consulta->soapAction()); } public function testDeveRetornarXmlCompletoVazioParaRealizarAconsulta() @@ -54,7 +54,7 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeProducao() { $consulta = new \Sped\Gnre\Sefaz\Consulta(); - $this->assertEquals($consulta->soapAction(), 'https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'); + $this->assertEquals($consulta->soapAction(), 'http://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'); } public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() diff --git a/testes/Sefaz/LoteTest.php b/testes/Sefaz/LoteTest.php index 3e212cb..92bb13f 100644 --- a/testes/Sefaz/LoteTest.php +++ b/testes/Sefaz/LoteTest.php @@ -26,14 +26,14 @@ public function testDeveUtilizarOAmbienteDeProducaoAoEnviarUmLoteParaOwebService { $lote = new Lote(); - $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); + $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); } public function testDeveRetornarAacaoAserExecutadaNoSoap() { $lote = new Lote(); - $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); + $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); } public function testDeveRetornarOxmlDoLoteSemCamposExtrasEparaEmitenteEdestinatarioJuridicos() From 0e041783c9dfd60dff663e6d0ab0c96b9aa6f35f Mon Sep 17 00:00:00 2001 From: Luiz Kim Date: Mon, 27 Nov 2023 16:09:51 -0300 Subject: [PATCH 13/13] GNRE --- README.md | 6 +- .../CertificatePfxFileOperation.php | 1 - .../Gnre/Exception/CannotOpenCertificate.php | 2 +- lib/Sped/Gnre/Helper/GnreHelper.php | 4 +- lib/Sped/Gnre/Sefaz/ConfigUf.php | 4 +- lib/Sped/Gnre/Sefaz/Consulta.php | 4 +- lib/Sped/Gnre/Sefaz/Guia.php | 22 +- lib/Sped/Gnre/Sefaz/Lote.php | 8 +- testes/Sefaz/ConfigUfTest.php | 6 +- testes/Sefaz/ConsultaTest.php | 6 +- testes/Sefaz/LoteTest.php | 10 +- xsd/v1/config_uf_v1.00.xsd | 4 +- xsd/v1/consulta_config_uf_v1.00.xsd | 4 +- xsd/v1/lote_gnre_consulta_v1.00.xsd | 2 +- xsd/v1/lote_gnre_recibo_v1.00.xsd | 2 +- xsd/v1/lote_gnre_result_v1.00.xsd | 2 +- xsd/v1/lote_gnre_v1.00.xsd | 1107 ++++++++--------- xsd/v1/tiposBasicoGNRE_v1.00.xsd | 2 +- xsd/v2/dados_gnre_v2.00.xsd | 2 +- xsd/v2/lote_gnre_result_v2.00.xsd | 2 +- xsd/v2/lote_gnre_v2.00.xsd | 2 +- xsd/v2/tiposBasicoGNRE_v2.00.xsd | 6 +- 22 files changed, 603 insertions(+), 605 deletions(-) diff --git a/README.md b/README.md index 4f6a8f5..5b90361 100755 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Antes de usar a API - É necessário entrar em contato com a SEFAZ de cada estado pedindo liberação do serviço de emissão de GNRE. -- Leita todos os tópicos no FAQ oficial em https://www.gnre.pe.gov.br/gnre/portal/faq.jsp. Os tópicos abordados são muito úteis para quem está começando nesse serviço. +- Leita todos os tópicos no FAQ oficial em http://www.gnre.pe.gov.br/gnre/portal/faq.jsp. Os tópicos abordados são muito úteis para quem está começando nesse serviço. GNRE PHP ================= @@ -88,10 +88,10 @@ Informações úteis |Descrição|Endereço| |---------|--------| |Grupo de discussão | https://groups.google.com/forum/#!forum/gnrephp| -|Site oficial do governo | https://www.gnre.pe.gov.br/gnre/index.html| +|Site oficial do governo | http://www.gnre.pe.gov.br/gnre/index.html| |Site do Projeto | http://nfephp-org.github.io/sped-gnre/| |Wiki, onde é possível encontrar maiores informações de como utilizar a API | https://github.com/nfephp-org/sped-gnre/wiki| -|Site oficial da SEFAZ de todo os estados|https://www.gnre.pe.gov.br/gnre/portal/linksUteis.jsp| +|Site oficial da SEFAZ de todo os estados|http://www.gnre.pe.gov.br/gnre/portal/linksUteis.jsp| 1. Antes de gerar qualquer guia GNRE com o seu certificado, tenha **CERTEZA** que você possui autorização para isso. A geração de GNRE depende de cada estado, ou seja, se você deseja gerar a guia para o Acre (com destino ao Acre) tenha certeza que diff --git a/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php b/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php index 394012f..e6fcddf 100644 --- a/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php +++ b/lib/Sped/Gnre/Configuration/CertificatePfxFileOperation.php @@ -77,7 +77,6 @@ public function open($password) $key = file_get_contents($this->filePath); $dataCertificate = array(); if (!openssl_pkcs12_read($key, $dataCertificate, $password)) { - print_r($dataCertificate); throw new CannotOpenCertificate($this->filePath); } diff --git a/lib/Sped/Gnre/Exception/CannotOpenCertificate.php b/lib/Sped/Gnre/Exception/CannotOpenCertificate.php index 731ddea..a0718ae 100644 --- a/lib/Sped/Gnre/Exception/CannotOpenCertificate.php +++ b/lib/Sped/Gnre/Exception/CannotOpenCertificate.php @@ -37,7 +37,7 @@ public function __construct($certificate) { parent::__construct( 'Não foi possível abrir o certificado ' . $certificate . ' verifique a senha informada', - 0, + null, null ); } diff --git a/lib/Sped/Gnre/Helper/GnreHelper.php b/lib/Sped/Gnre/Helper/GnreHelper.php index fcce7fa..c611dd0 100644 --- a/lib/Sped/Gnre/Helper/GnreHelper.php +++ b/lib/Sped/Gnre/Helper/GnreHelper.php @@ -62,7 +62,7 @@ public static function getGuiaGnre($xmlNf): Guia $guia->c03_idContribuinteEmitente = $xml->NrDocumentoEmpresa; $guia->c18_enderecoEmitente = $xml->EnderecoEmpresa; - $guia->c19_municipioEmitente = 15004;//$xml->CdMunicipioEmpresa; + $guia->c19_municipioEmitente = 15004; //$xml->CdMunicipioEmpresa; $guia->c20_ufEnderecoEmitente = $xml->UfEmpresa; $guia->c17_inscricaoEstadualEmitente = $xml->NrIEEmpresa; @@ -71,7 +71,7 @@ public static function getGuiaGnre($xmlNf): Guia $guia->c35_idContribuinteDestinatario = $xml->NrDocumentoCliente; $guia->c36_inscricaoEstadualDestinatario = $xml->NrIECliente; $guia->c37_razaoSocialDestinatario = $xml->NmCliente; - $guia->c38_municipioDestinatario = '06200';//$xml->CdMunicipioCliente; + $guia->c38_municipioDestinatario = '06200'; //$xml->CdMunicipioCliente; return $guia; } diff --git a/lib/Sped/Gnre/Sefaz/ConfigUf.php b/lib/Sped/Gnre/Sefaz/ConfigUf.php index f7cacde..bba02ab 100644 --- a/lib/Sped/Gnre/Sefaz/ConfigUf.php +++ b/lib/Sped/Gnre/Sefaz/ConfigUf.php @@ -57,8 +57,8 @@ public function getHeaderSoap() public function soapAction() { return $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF' : - 'http://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'; + 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF' : + 'https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'; } /** diff --git a/lib/Sped/Gnre/Sefaz/Consulta.php b/lib/Sped/Gnre/Sefaz/Consulta.php index 184b957..b41f81d 100644 --- a/lib/Sped/Gnre/Sefaz/Consulta.php +++ b/lib/Sped/Gnre/Sefaz/Consulta.php @@ -57,8 +57,8 @@ public function getHeaderSoap() public function soapAction() { return $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote' : - 'http://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; + 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote' : + 'https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; } /** diff --git a/lib/Sped/Gnre/Sefaz/Guia.php b/lib/Sped/Gnre/Sefaz/Guia.php index b74743a..2d29b13 100755 --- a/lib/Sped/Gnre/Sefaz/Guia.php +++ b/lib/Sped/Gnre/Sefaz/Guia.php @@ -47,7 +47,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c02_receita; @@ -55,7 +55,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c25_detalhamentoReceita; @@ -63,7 +63,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c26_produto; @@ -71,7 +71,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c27_tipoIdentificacaoEmitente; @@ -86,7 +86,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c28_tipoDocOrigem; @@ -94,7 +94,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c04_docOrigem; @@ -125,7 +125,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c15_convenio; @@ -183,7 +183,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo inteiro * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var int */ private $c34_tipoIdentificacaoDestinatario; @@ -264,7 +264,7 @@ class Guia /** * Para esse atributo é esperado um dado do tipo string * para maiores informações visualizar a documentação oficial do GNRE - * https://www.gnre.pe.gov.br/gnre/index.html + * http://www.gnre.pe.gov.br/gnre/index.html * @var string */ private $c42_identificadorGuia; @@ -325,7 +325,7 @@ class Guia * Dados retornados pelo web service da SEFAZ com a situação * da guia, se foi processada com sucesso ou se houve erro. * Para maiores informações sobre esse item consulte - * a documentação de retorno em https://www.gnre.pe.gov.br/gnre/portal/downloads.jsp + * a documentação de retorno em http://www.gnre.pe.gov.br/gnre/portal/downloads.jsp * @var int */ private $retornoSituacaoGuia; @@ -334,7 +334,7 @@ class Guia * Dados retornados pelo web service da SEFAZ com o numero de sequencia * que a guia tem na SEFAZ. * Para maiores informações sobre esse item consulte - * a documentação de retorno em https://www.gnre.pe.gov.br/gnre/portal/downloads.jsp + * a documentação de retorno em http://www.gnre.pe.gov.br/gnre/portal/downloads.jsp * @var type */ private $retornoSequencialGuia; diff --git a/lib/Sped/Gnre/Sefaz/Lote.php b/lib/Sped/Gnre/Sefaz/Lote.php index 88d5011..8ebaa39 100755 --- a/lib/Sped/Gnre/Sefaz/Lote.php +++ b/lib/Sped/Gnre/Sefaz/Lote.php @@ -71,8 +71,8 @@ public function setEstadoFactory(EstadoFactory $estadoFactory) public function getHeaderSoap() { $action = $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao' : - 'http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao'; + 'http://www.testegnre.pe.gov.br/webservice/GnreRecepcaoLote' : + 'http://www.gnre.pe.gov.br/webservice/GnreRecepcaoLote'; return array( 'Content-Type: application/soap+xml;charset=utf-8;action="' . $action . '"', @@ -86,8 +86,8 @@ public function getHeaderSoap() public function soapAction() { return $this->ambienteDeTeste ? - 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao' : - 'http://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao'; + 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao' : + 'https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao'; } /** diff --git a/testes/Sefaz/ConfigUfTest.php b/testes/Sefaz/ConfigUfTest.php index ada8430..8f09813 100644 --- a/testes/Sefaz/ConfigUfTest.php +++ b/testes/Sefaz/ConfigUfTest.php @@ -36,7 +36,7 @@ public function testDeveRetornarAacaoAserExecutadaNoSoap() { $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); - $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF', $consulta->soapAction()); + $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF', $consulta->soapAction()); } public function testDeveRetornarXmlCompletoVazioParaRealizarAconsulta() @@ -55,7 +55,7 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeProducao() { $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); - $this->assertEquals($consulta->soapAction(), 'http://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'); + $this->assertEquals($consulta->soapAction(), 'https://www.gnre.pe.gov.br/gnreWS/services/GnreConfigUF'); } public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() @@ -63,6 +63,6 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() $consulta = new \Sped\Gnre\Sefaz\ConfigUf(); $consulta->utilizarAmbienteDeTeste(true); - $this->assertEquals($consulta->soapAction(), 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF'); + $this->assertEquals($consulta->soapAction(), 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreConfigUF'); } } diff --git a/testes/Sefaz/ConsultaTest.php b/testes/Sefaz/ConsultaTest.php index 933f504..fb8e8b1 100644 --- a/testes/Sefaz/ConsultaTest.php +++ b/testes/Sefaz/ConsultaTest.php @@ -36,7 +36,7 @@ public function testDeveRetornarAacaoAserExecutadaNoSoap() { $consulta = new \Sped\Gnre\Sefaz\Consulta(); - $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote', $consulta->soapAction()); + $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote', $consulta->soapAction()); } public function testDeveRetornarXmlCompletoVazioParaRealizarAconsulta() @@ -54,7 +54,7 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeProducao() { $consulta = new \Sped\Gnre\Sefaz\Consulta(); - $this->assertEquals($consulta->soapAction(), 'http://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'); + $this->assertEquals($consulta->soapAction(), 'https://www.gnre.pe.gov.br/gnreWS/services/GnreResultadoLote'); } public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() @@ -62,7 +62,7 @@ public function testDeveRetornarAactionAserExecutadaNoWebServiceDeTestes() $consulta = new \Sped\Gnre\Sefaz\Consulta(); $consulta->utilizarAmbienteDeTeste(true); - $action = 'http://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; + $action = 'https://www.testegnre.pe.gov.br/gnreWS/services/GnreResultadoLote'; $this->assertEquals($consulta->soapAction(), $action); } } diff --git a/testes/Sefaz/LoteTest.php b/testes/Sefaz/LoteTest.php index 92bb13f..186ba67 100644 --- a/testes/Sefaz/LoteTest.php +++ b/testes/Sefaz/LoteTest.php @@ -17,7 +17,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoap() $lote = new Lote(); $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreLoteRecepcao"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.gnre.pe.gov.br/webservice/GnreRecepcaoLote"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } @@ -26,14 +26,14 @@ public function testDeveUtilizarOAmbienteDeProducaoAoEnviarUmLoteParaOwebService { $lote = new Lote(); - $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); + $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); } public function testDeveRetornarAacaoAserExecutadaNoSoap() { $lote = new Lote(); - $this->assertEquals('http://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); + $this->assertEquals('https://www.gnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); } public function testDeveRetornarOxmlDoLoteSemCamposExtrasEparaEmitenteEdestinatarioJuridicos() @@ -313,7 +313,7 @@ public function testDeveUtilizarOAmbienteDeTestesAoEnviarUmLoteParaOwebService() { $lote = new Lote(); $lote->utilizarAmbienteDeTeste(true); - $this->assertEquals('http://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); + $this->assertEquals('https://www.testegnre.pe.gov.br/gnreWS/services/GnreLoteRecepcao', $lote->soapAction()); } public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebServiceDeteste() @@ -323,7 +323,7 @@ public function testDeveRetornarOsCabecalhosParaArequisicaoSoapAoWebServiceDetes $headersArray = $lote->getHeaderSoap(); - $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreLoteRecepcao"'; + $header = 'Content-Type: application/soap+xml;charset=utf-8;action="http://www.testegnre.pe.gov.br/webservice/GnreRecepcaoLote"'; $this->assertEquals($header, $headersArray[0]); $this->assertEquals('SOAPAction: processar', $headersArray[1]); } diff --git a/xsd/v1/config_uf_v1.00.xsd b/xsd/v1/config_uf_v1.00.xsd index fc6e78c..159b97e 100755 --- a/xsd/v1/config_uf_v1.00.xsd +++ b/xsd/v1/config_uf_v1.00.xsd @@ -1,7 +1,7 @@ - + xmlns:tns="http://www.gnre.pe.gov.br"> diff --git a/xsd/v1/consulta_config_uf_v1.00.xsd b/xsd/v1/consulta_config_uf_v1.00.xsd index 7e5b6f8..a3e5ec2 100755 --- a/xsd/v1/consulta_config_uf_v1.00.xsd +++ b/xsd/v1/consulta_config_uf_v1.00.xsd @@ -1,7 +1,7 @@ - + xmlns:tns="http://www.gnre.pe.gov.br"> diff --git a/xsd/v1/lote_gnre_consulta_v1.00.xsd b/xsd/v1/lote_gnre_consulta_v1.00.xsd index 3a14891..97c6f4a 100755 --- a/xsd/v1/lote_gnre_consulta_v1.00.xsd +++ b/xsd/v1/lote_gnre_consulta_v1.00.xsd @@ -1,5 +1,5 @@ - - - - - - - - - - - - - - - - - - Código da UF - Favorecida. - (Utilizar a Tabela - do IBGE) - - - - - - - Código da Receita. - - - - - - - - - - - - - Código do - Detalhamento da - Receita. - - - - - - - - - - - - - Código do Produto. - - - - - - - - - - - - - Código do Tipo de - Identificação do - Emitente: - - - - - - - Número do Documento - de Identificação do - Contribuinte - Emitente. - - - - - - - - Número - do CNPJ - do - Contribuinte - - - - - - - Número - do CPF - do - Contribuinte - - - - - - - - - - Código do Tipo de - Documento de Origem. - - - - - - - - - - - - - Número do Documento - de Origem. - - - - - - - - - - - - - Valor Original da - Guia. - - - - - - - Valor total da guia - (valor original + - encargos). - - - - - - - Data de vencimento - da guia. - - - - - - - Número do convênio. - - - - - - - - - - - - Nome da firma ou a - Razão Social do - Contribuinte. - - - - - - - - - - - - Inscrição Estadual - do Contribuinte na - UF favorecida. - - - - - - - Endereço do - Contribuinte. - - - - - - - - - - - - Código do Município - de localização do - Contribuinte.(Utilizar - a tabela do IBGE) - - - - - - - Código da UF do - Contribuinte. - - - - - - - CEP do Contribuinte. - - - - - - - - - - - - - Telefone do - contribuinte. - - - - - - - - - - - - - Tipo de - Identificação do - Destinatário: - - - - - - - Número do Documento - de Identificação do - Contribuinte - Destinatário. - - - - - - - - Número - do CNPJ - do - Contribuinte - Destinatário - - - - - - - Número - do CPF - do - Contribuinte - Destinatário - - - - - - - - - - Inscrição Estadual - do Contribuinte na - UF favorecida. - - - - - - - Nome da firma ou a - Razão Social do - Contribuinte. - - - - - - - - - - - - Código do Município - de Destino.(Utilizar - a tabela do IBGE) - - - - - - - Data prevista de - pagamento informada - pelo contribuinte. - - - - - - - - Informações de - período de - apuração - - - - - - - Indicador - do - Periodo: - 0 – - mensal; - 1 – 1a. - quinzena; - 2 – 2a. - quinzena; - 3 – 1o. - decêndio; - 4 – 2o. - decêndio; - 5 – 3o. - decêndio; - - - - - - - - - - - - - - - - - - Mês de - referência - da - Apuração - - - - - - - Ano de - referência - da - Apuração - - - - - - - Parcela - de - referência - da - Apuração - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Código da UF + Favorecida. + (Utilizar a Tabela + do IBGE) + + + + + + + Código da Receita. + + + + + + + + + + + + + Código do + Detalhamento da + Receita. + + + + + + + + + + + + + Código do Produto. + + + + + + + + + + + + + Código do Tipo de + Identificação do + Emitente: + + + + + + + Número do Documento + de Identificação do + Contribuinte + Emitente. + + + + + + + + Número + do CNPJ + do + Contribuinte + + + + + + + Número + do CPF + do + Contribuinte + + + + + + + + + + Código do Tipo de + Documento de Origem. + + + + + + + + + + + + + Número do Documento + de Origem. + + + + + + + + + + + + + Valor Original da + Guia. + + + + + + + Valor total da guia + (valor original + + encargos). + + + + + + + Data de vencimento + da guia. + + + + + + + Número do convênio. + + + + + + + + + + + + Nome da firma ou a + Razão Social do + Contribuinte. + + + + + + + + + + + + Inscrição Estadual + do Contribuinte na + UF favorecida. + + + + + + + Endereço do + Contribuinte. + + + + + + + + + + + + Código do Município + de localização do + Contribuinte.(Utilizar + a tabela do IBGE) + + + + + + + Código da UF do + Contribuinte. + + + + + + + CEP do Contribuinte. + + + + + + + + + + + + + Telefone do + contribuinte. + + + + + + + + + + + + + Tipo de + Identificação do + Destinatário: + + + + + + + Número do Documento + de Identificação do + Contribuinte + Destinatário. + + + + + + + + Número + do CNPJ + do + Contribuinte + Destinatário + + + + + + + Número + do CPF + do + Contribuinte + Destinatário + + + + + + + + + + Inscrição Estadual + do Contribuinte na + UF favorecida. + + + + + + + Nome da firma ou a + Razão Social do + Contribuinte. + + + + + + + + + + + + Código do Município + de Destino.(Utilizar + a tabela do IBGE) + + + + + + + Data prevista de + pagamento informada + pelo contribuinte. + + + + + + + + Informações de + período de + apuração + + + + + + + Indicador + do + Periodo: + 0 – + mensal; + 1 – 1a. + quinzena; + 2 – 2a. + quinzena; + 3 – 1o. + decêndio; + 4 – 2o. + decêndio; + 5 – 3o. + decêndio; + + + + + + + + + + + + + + + + + + Mês de + referência + da + Apuração + + + + + + + Ano de + referência + da + Apuração + + + + + + + Parcela + de + referência + da + Apuração + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/xsd/v1/tiposBasicoGNRE_v1.00.xsd b/xsd/v1/tiposBasicoGNRE_v1.00.xsd index b7bce9a..d1f3847 100755 --- a/xsd/v1/tiposBasicoGNRE_v1.00.xsd +++ b/xsd/v1/tiposBasicoGNRE_v1.00.xsd @@ -2,7 +2,7 @@ diff --git a/xsd/v2/dados_gnre_v2.00.xsd b/xsd/v2/dados_gnre_v2.00.xsd index 65aff65..5a8561d 100644 --- a/xsd/v2/dados_gnre_v2.00.xsd +++ b/xsd/v2/dados_gnre_v2.00.xsd @@ -2,7 +2,7 @@ diff --git a/xsd/v2/lote_gnre_result_v2.00.xsd b/xsd/v2/lote_gnre_result_v2.00.xsd index c46b3db..faa115f 100644 --- a/xsd/v2/lote_gnre_result_v2.00.xsd +++ b/xsd/v2/lote_gnre_result_v2.00.xsd @@ -1,5 +1,5 @@ - - + targetNamespace="http://www.gnre.pe.gov.br" + xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:Q1="http://www.gnre.pe.gov.br"> @@ -23,7 +23,7 @@ maxOccurs="1"> - +