2
Using the Nfephp project API, through the function:
$retorno = $nfe->sefazEnviaLote($aXml, $tpAmb, $idLote, $aResposta, $indSinc, $flagZip);
get the array $aResposta
.
However this array is returning the tag nRec
empty. Follows below XML and the return of the array.
XML folder temporárias
:
<?xml version='1.0' encoding='UTF-8'?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header/>
<env:Body>
<nfeAutorizacaoLoteResult xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeAutorizacao">
<retEnviNFe versao="3.10" xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:ns0="http://www.w3.org/2000/09/xmldsig#">
<tpAmb>2</tpAmb>
<verAplic>GO3.0</verAplic>
<cStat>104</cStat>
<xMotivo>Lote processado</xMotivo>
<cUF>52</cUF>
<dhRecbto>2017-01-12T11:45:40-02:00</dhRecbto>
<protNFe versao="3.10">
<infProt>
<tpAmb>2</tpAmb>
<verAplic>GO3.0</verAplic>
<chNFe>52170119811185000142550010000000361385289826</chNFe>
<dhRecbto>2017-01-12T11:45:40-02:00</dhRecbto>
<nProt>152170016903387</nProt>
<digVal>N3MSuIoDpO8EIi032j56zhQ+hTU=</digVal>
<cStat>100</cStat>
<xMotivo>Autorizado o uso da NF-e</xMotivo>
</infProt>
</protNFe>
</retEnviNFe>
</nfeAutorizacaoLoteResult>
</env:Body>
</env:Envelope>
Array return $aResposta
:
Array (
[bStat] => 1
[versao] => 3.10
[tpAmb] => 2
[verAplic] => GO3.0
[cStat] => 104
[xMotivo] => Lote processado
[cUF] => 52
[dhRecbto] => 2017-01-12T11:45:40-02:00
[tMed] =>
[nRec] =>
[prot] =>
Array (
[0] => Array (
[chNFe] => 52170119811185000142550010000000361385289826
[dhRecbto] => 2017-01-12T11:45:40-02:00
[nProt] => 152170016903387
[digVal] => N3MSuIoDpO8EIi032j56zhQ+hTU=
[cStat] => 100
[xMotivo] => Autorizado o uso da NF-e
)
)
)
I mean, I can’t get the receipt number using the function:
$nfe->sefazConsultaRecibo($recibo, $tpAmb, $aResposta);
However, I can print DANF-e normally...
The receipt number is in this array? what did you put? You already receive this array and you are ok? 7
– Miguel
The receipt number is empty. @Miguel
– lucasbento
Ha I understand, but should come from this xml? Is that in xml there is also
– Miguel
Yes, you should. Can we go to chat? http://chat.stackexchange.com/rooms/51669/nrec-vazia-ao-receberretorno-da-sefaz
– lucasbento