NFe - ERROR in AddProt (For those who have already used NfePHP)

0

(For those who have already used NfePHP)

I've done almost all of the steps to Generate Nfe:

  • I created the xml in MakeNfe
  • Signed xml with AssinaNfe
  • Validated with ValidaXml
  • I sent the Lot to Sefaz with the EnviaLote.php
  • I consulted the Receipt with the receipt code in the Recieve Query and it was approved for use
  • So far so good, but in AddProt is returning the error below and in TestaDanfe.php is not finding the xml file in the AddProt using the Receipt and the v key the following error is occurring:

    Warning: DOMDocument::loadXML(): Start tag expected, '<' not found in Entity, line: 1 in /home/MEUSITE/public_html/nota-fiscal/nfephp-master/libs/Common/Dom/Dom.php on line 37
    
    Fatal error: Uncaught exception 'NFePHP\Common\Exception\RuntimeException' with message 'O arquivo indicado não é um XML!' in /home/MEUSITE/public_html/nota-fiscal/nfephp-master/libs/Common/Dom/Dom.php:39 Stack trace: #0 /home/MEUSITE/public_html/nota-fiscal/nfephp-master/libs/NFe/ToolsNFe.php(349): NFePHP\Common\Dom\Dom->loadXMLString('/home/MEUSITE/...') #1 /home/MEUSITE/public_html/4.00testaAddProt.php(24): NFePHP\NFe\ToolsNFe->addProtocolo('/home/MEUSITE/...', '/home/MEUSITE/...', true) #2 {main} thrown in /home/MEUSITE/public_html/Sistema/nota-fiscal/nfephp-master/libs/Common/Dom/Dom.php on line 39
    

    NOTE: The paths are correct, I did not make any changes in the XML, I just did the right procedures.

    What am I doing wrong? What is missing to generate NFE and DANFE in PDF ? What is NFE-PHP's AddProt.php file ?

        
    asked by anonymous 11.10.2017 / 03:15

    1 answer

    -1

    Friend, I went through this, the error was:

    It has to be in my case: $ indSinc = '0'; // 0 = asynchronous, 1 = synchronous

    to get the receipt getting the generated file after sending the batch

        
    25.06.2018 / 15:01