Jump to content

Compre o Delphi
Com até 30% de desconto
e parcelado em até 12x sem juros

Saiba Mais

Balança SM100 performance surpreendente

Tecnologia Japonesa   Teclado e Visor resistentes a água
Consumo inteligente de etiquetas   Baixo custo de manutenção
Comunicação Ethernet e WIFI independentes

Saiba mais

Impressora de Etiquetas ELGIN - L42 PRO

Protocolos PPLA, PPLB, ZPL, EPL (automático)
Porta USB padrão Opcionais: Ethernet, Serial, Paralela
Sensor de Etiquetas Móvel Garantia de 18 meses

Saiba mais

eduardo.mrj

CANCELAMENTO NFCe (integrador) ERRO (500) Internal Server Error

Recommended Posts

 

30/04/19 16:50:45:498 - Sessão: 919778, Resposta: \"919778|06000|0000|Enviado com sucesso + Retorno SEFAZ-CE.|||The remote server returned an error: (500) Internal Server Error.|

<Integrador><Identificador><Valor>847112</Valor></Identificador><Componente Nome="NFCE"><Metodo Nome="HRecepcaoEvento"><Parametros><Parametro><Nome>numeroSessao</Nome><Valor>847112</Valor></Parametro><Parametro><Nome>versaoDados</Nome><Valor>1.00</Valor></Parametro><Parametro><Nome>cUF</Nome><Valor>23</Valor></Parametro><Parametro><Nome>NumeroNFCe</Nome><Valor>23190403072024000144650060000000431226535862</Valor></Parametro><Parametro><Nome>DataHoraNFCeGerado</Nome><Valor>20190430163215</Valor></Parametro><Parametro><Nome>ValorNFCe</Nome><Valor>3.83</Valor></Parametro><Parametro><Nome>dados</Nome><Valor>PHNvYXAxMjpFbnZlbG9wZSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczpzb2FwMTI9Imh0dHA6Ly93d3cudzMub3JnLzIwMDMvMDUvc29hcC1lbnZlbG9wZSI+PHNvYXAxMjpCb2R5PjxuZmVEYWRvc01zZyB4bWxucz0iaHR0cDovL3d3dy5wb3J0YWxmaXNjYWwuaW5mLmJyL25mZ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VW84VmJrWnRzbHJYekR2TG9JY09lcG03ZURUSmZlN2l1eExiZ2VNaVk1VEl6RUd0RmhUa2hXenY2YWF0RTc1czZwMmoxcjBSTEhkWWJ2MWVPN01mVUltd2NuejBLWXhRYWw4RURWZXQza214Q0R3cnVvMC9lVk1oS3UvK2cxdFB3YklQTkZnV3NoeWhpRW9Rc2hZeGVrVlUzQkRpUUFDWEdKQmRaL096MnJSbUNJSEtBUy84L29BeUhjMEdMazNabmVEMVlKS3pzVlNZYVh2TC9iVVlOS3BMMlI1SEd3aW5IWkZka25JVmpkRExER2hOK1lGWHpwN0ttODRRTzNZMHUzWi9PbldlVWFIZ3N0MFlEVUx3VmZ3cFVtVEtJcHplQ2Iyc1N3VXlUSm9NQnpBSnRLcjBpRm92aHgzSHFRWUROZTRWcVlhSlVpUFFxeCt1bUtUbitqaWVScXlRRmpuSjVsKzVQNzJ2RTNRbW81ZEd6dzJHeVF0RFRBRVlTZUVnOVIyY2tsRjJmOXg1bm1rMCtvbjd5MHBOUjZaajE3UFNSbmtmeEJDNkhOY0taSCtObjhZSkhtY3pudzRlTEErdkVnNStSeXg1NCtTUFpZTE90RzMvdzhkdXhTNjB1T1YxWUdwTTZHSmJCSXVaNWpNakJVdHkydU1wazJHSnhGMm9LVUE9PTwvWDUwOUNlcnRpZmljYXRlPjwvWDUwOURhdGE+PC9LZXlJbmZvPjwvU2lnbmF0dXJlPjwvZXZlbnRvPjwvZW52RXZlbnRvPjwvbmZlRGFkb3NNc2c+PC9zb2FwMTI6Qm9keT48L3NvYXAxMjpFbnZlbG9wZT4=</Valor></Parametro></Parametros></Metodo></Componente></Integrador>
procedure TNFeEnvEvento.DefinirDadosIntegrador;
begin
  inherited DefinirDadosIntegrador;

  if Assigned(FPDFeOwner.Integrador) then
  begin
    // Para cancelamento é necessário informar os dados da nota //
    // Verificar a necessidade de acrescentar o teCancSubst
    if (FEvento.Evento[0].InfEvento.tpEvento = teCancelamento) and
       (TACBrNFe(FPDFeOwner).NotasFiscais.Count > 0) then
    begin
      FPDFeOwner.Integrador.Parametros.Values['versaoDados'] :=  '1.00';
      FPDFeOwner.Integrador.Parametros.Values['NumeroNFCe'] := OnlyNumber(TACBrNFe(FPDFeOwner).NotasFiscais.Items[0].NFe.infNFe.ID);
      FPDFeOwner.Integrador.Parametros.Values['DataHoraNFCeGerado'] := FormatDateTime('yyyymmddhhnnss', TACBrNFe(FPDFeOwner).NotasFiscais.Items[0].NFe.Ide.dEmi);
      FPDFeOwner.Integrador.Parametros.Values['ValorNFCe'] := StringReplace(FormatFloat('0.00',TACBrNFe(FPDFeOwner).NotasFiscais.Items[0].NFe.Total.ICMSTot.vNF),',','.',[rfReplaceAll]);
    end;

    FPDFeOwner.Integrador.SetNomeMetodo('RecepcaoEvento', (FPConfiguracoesNFe.WebServices.Ambiente = taHomologacao) );
  end;
end;

 

Foi detectado que sempre está sendo informado a "versaodados" = '1.00', quando mudamos para 4.00, passou normalmente.

Acima está o XML que foi gerado e enviado causando o erro.

 

Edited by eduardo.mrj
  • Like 1

Obrigado a todos!

Share this post


Link to post
Share on other sites

Na linha abaixo

 FPDFeOwner.Integrador.Parametros.Values['versaoDados'] :=  '4.00';
  • Like 1

Obrigado a todos!

Share this post


Link to post
Share on other sites

Bom dia.

Estou com o mesmo problema. Mudei a versão de 1.00 para 4.00 e continua o mesmo erro, @eduardo.mrj você fez mais alguma alteração?


"A arte de programar consiste em organizar e dominar a complexidade." 🤖

-Edsger W. Dijkstra

Share this post


Link to post
Share on other sites

Então, Debugando dentro do componente, descobri que meu erro foi que eu não estava alimentando a "NotasFiscais.add" antes de efetuar o cancelamento.

Realmente o se eu coloco a versão 4.00 ali funciona.

Obrigado @eduardo.mrj vamos aguardar se vão ajustar no componente.

 


"A arte de programar consiste em organizar e dominar a complexidade." 🤖

-Edsger W. Dijkstra

Share this post


Link to post
Share on other sites

O ACBrIntegrador está preenchendo o campo de acordo com a documentação.

Verificando na documentação do Integrador da SEFAZ-CE, a informação que  deve ir no campo versaoDados é '1.00', pelo que vi essa versão não é do leiaute da NFCE e sim do Cancelamento.

image.png.9bc8eb8370ea15b99f202b0c4f93b2b7.png

Share this post


Link to post
Share on other sites

Boa tarde @DanielSantos.

Pois é então teria que rever com o SEFAZ do Ceará porque realmente se eu mudo para 4.00 funciona mas se eu deixo 1.00 da o retorno citado no tópico a cima.

Obrigado pela compreensão mas o que está na documentação não é fiel com o que o servidor realmente está recebendo.

  • Thanks 1

"A arte de programar consiste em organizar e dominar a complexidade." 🤖

-Edsger W. Dijkstra

Share this post


Link to post
Share on other sites

Bom dia pessoal.

Me desculpem por abrir o tópico novamente, mas agora o erro:

Citar

The remote server returned an error: (500) Internal Server Error.

Está dando na hora de transmitir também. Até ontem eu estava emitindo normal, hoje parou de funcionar. Alguém sofrendo com o mesmo problema ao tentar transmitir NFC-e do Ceará pelo integrador?

Muito obrigado.


"A arte de programar consiste em organizar e dominar a complexidade." 🤖

-Edsger W. Dijkstra

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...