@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if ($compactar) { |
82 | 82 | $gzdata = base64_encode(gzencode($cons, 9, FORCE_GZIP)); |
83 | 83 | $body = "<cteDadosMsgZip xmlns=\"$this->urlNamespace\">$gzdata</cteDadosMsgZip>"; |
84 | - $method = $this->urlMethod."Zip"; |
|
84 | + $method = $this->urlMethod . "Zip"; |
|
85 | 85 | $parameters = ['cteDadosMsgZip' => $gzdata]; |
86 | 86 | $body = "<cteDadosMsgZip xmlns=\"$this->urlNamespace\">$gzdata</cteDadosMsgZip>"; |
87 | 87 | } |
@@ -374,9 +374,9 @@ discard block |
||
374 | 374 | } |
375 | 375 | //monta a consulta |
376 | 376 | $consulta = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">" |
377 | - . "<tpAmb>".$this->tpAmb."</tpAmb>" |
|
377 | + . "<tpAmb>" . $this->tpAmb . "</tpAmb>" |
|
378 | 378 | . "<cUFAutor>$cUF</cUFAutor>" |
379 | - . "<CNPJ>".$this->config->cnpj."</CNPJ>$tagNSU</distDFeInt>"; |
|
379 | + . "<CNPJ>" . $this->config->cnpj . "</CNPJ>$tagNSU</distDFeInt>"; |
|
380 | 380 | //valida o xml da requisição |
381 | 381 | $this->isValid($this->urlVersion, $consulta, 'distDFeInt'); |
382 | 382 | $this->lastRequest = $consulta; |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | $dt = new \DateTime(); |
667 | 667 | $dhEvento = $dt->format('Y-m-d\TH:i:sP'); |
668 | 668 | $sSeqEvento = str_pad($nSeqEvento, 2, "0", STR_PAD_LEFT); |
669 | - $eventId = "ID".$tpEvento.$chave.$sSeqEvento; |
|
669 | + $eventId = "ID" . $tpEvento . $chave . $sSeqEvento; |
|
670 | 670 | $cOrgao = UFList::getCodeByUF($uf); |
671 | 671 | |
672 | 672 | $request = "<eventoCTe xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">" |
@@ -731,9 +731,9 @@ discard block |
||
731 | 731 | $tagChave = "<consChNFe><chNFe>$chave</chNFe></consChNFe>"; |
732 | 732 | //monta a consulta |
733 | 733 | $consulta = "<distDFeInt xmlns=\"$this->urlPortal\" versao=\"$this->urlVersion\">" |
734 | - . "<tpAmb>".$this->tpAmb."</tpAmb>" |
|
734 | + . "<tpAmb>" . $this->tpAmb . "</tpAmb>" |
|
735 | 735 | . "<cUFAutor>$cUF</cUFAutor>" |
736 | - . "<CNPJ>".$this->config->cnpj."</CNPJ>$tagChave</distDFeInt>"; |
|
736 | + . "<CNPJ>" . $this->config->cnpj . "</CNPJ>$tagChave</distDFeInt>"; |
|
737 | 737 | //valida o xml da requisição |
738 | 738 | $this->isValid($this->urlVersion, $consulta, 'distDFeInt'); |
739 | 739 | $this->lastRequest = $consulta; |
@@ -785,8 +785,8 @@ discard block |
||
785 | 785 | . "<indOp>$indOp</indOp>" |
786 | 786 | . "<raizCNPJ>$raizCNPJ</raizCNPJ>" |
787 | 787 | . "<dadosCsc>" |
788 | - . "<idCsc>".$this->config->CSCid."</idCsc>" |
|
789 | - . "<codigoCsc>".$this->config->CSC."</codigoCsc>" |
|
788 | + . "<idCsc>" . $this->config->CSCid . "</idCsc>" |
|
789 | + . "<codigoCsc>" . $this->config->CSC . "</codigoCsc>" |
|
790 | 790 | . "</dadosCsc>" |
791 | 791 | . "</admCscNFCe>"; |
792 | 792 | } |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | $dom->loadXML($cte); |
818 | 818 | //verifica a validade no webservice da SEFAZ |
819 | 819 | $tpAmb = $dom->getElementsByTagName('tpAmb')->item(0)->nodeValue; |
820 | - $infCTe = $dom->getElementsByTagName('infCte')->item(0); |
|
820 | + $infCTe = $dom->getElementsByTagName('infCte')->item(0); |
|
821 | 821 | $chCTe = preg_replace('/[^0-9]/', '', $infCTe->getAttribute("Id")); |
822 | 822 | $protocol = $dom->getElementsByTagName('nProt')->item(0)->nodeValue; |
823 | 823 | $digval = $dom->getElementsByTagName('DigestValue')->item(0)->nodeValue; |