Ir para conteúdo
  • Cadastre-se

  • Este tópico foi criado há 374 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

Postado

Bom dia

Fiz o boleto pela API do banco inter, aqui na minha OK ... Emiti Sandbox, homologação e inclusive um em produção, foi tudo OK.

Em produção na maquina do cliente envia certinho, mas não pega o retorno do banco com os dados do envio.

Verificando o Log, esta correto o envio, inclusive o cliente esta entrando dentro do banco e imprimindo por la .. 

Agora analisando o log meu fonte pude notar uma coisa que pode ser o problema.

após o envio eu faço o seguinte

 

if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then

e ai eu atualizo o retorno no meu banco de dados .. e imprimo os boletos... 

 

so que note que não esta vindo a codbarras... 

 

Agora por que na minha mauqina vem o Codbarras e no cliente não vem ? 

 

alguem tem ideia do que estou fazendo errado . .
vou anexar o log, So coloquei xxxxxxxxxxxxxxx nos cnpj do log

 

logInter.txt

  • Consultores
Postado

Ele deve estar falando da openssl tem que ser 1.0 superior

 

Consultora ACBr Pro

Juliomar Marchetti

Ajude o Projeto ACBr crescer - Seja Pro

discord: juliomar
telegram: juliomar
e-mail: [email protected]
http://www.juliomarmarchetti.com.br

 

MVP_NewLogo_100x100_Transparent-02.png
Projeto ACBr - A maior comunidade Open Source de Automação Comercial do Brasil


Participe de nosso canal no Discord e fique ainda mais próximo da Comunidade !!

Postado (editado)
procedure EnviarBoletos;
var
  SLRemessa: TStringList;
  i, j: Integer;
  Boleto : TACBrBoleto;
begin
  Boleto := FACBrBoleto;
  if not ConfirmMessage('Deseja enviar '+Boleto.ListadeBoletos.Count.ToString + '  Boleto(s)', True ) then
    Abort;

try
  //Função de Envio
  MostraEspera('Enviando boletos');
  Boleto.Configuracoes.WebService.Operacao := tpInclui;

  Boleto.Enviar; // <<< retorna como false se o httpresult code for diferente de 200,201,202
  //Verifica Lista com os retornos
finally
  fechaespera;
end;


  if Boleto.TotalListaRetornoWeb > 0 then
  begin
    SLRemessa := TStringList.Create;
    try
      for i:= 0 to Pred(Boleto.TotalListaRetornoWeb) do
      begin
        //Ler todos os campos da classe Retorno
        SLRemessa.Add('Cod_Retorno='+ Boleto.ListaRetornoWeb[i].CodRetorno + sLineBreak +
                      'Msg_Retorno='+ Boleto.ListaRetornoWeb[i].MsgRetorno + sLineBreak +
                      'Ori_Retorno='+ Boleto.ListaRetornoWeb[i].OriRetorno + sLineBreak +
                      'HTTP_Result='+ IntToStr(Boleto.ListaRetornoWeb[i].HTTPResultCode) + sLineBreak +
                      'JSON='+ Boleto.ListaRetornoWeb[i].JSON);

        if Boleto.ListaRetornoWeb[i].ListaRejeicao.Count > 0 then
        begin
         for j:= 0 to Pred(Boleto.ListaRetornoWeb[i].ListaRejeicao.Count) do
         begin
           SLRemessa.Add('[Rejeicao'   +IntToStr(j)+']' + sLineBreak +
                         'Campo='      + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Campo + sLineBreak +
                         'Codigo='     + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Codigo + sLineBreak +
                         'Versao='     + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Versao + sLineBreak +
                         'Mensagem='   + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Mensagem + sLineBreak +
                         'Ocorrencia=' + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Ocorrencia + sLineBreak +
                         'Valor='      + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Valor + sLineBreak );
         end;
        end;

         SLRemessa.Add('HEADER'          + sLineBreak +
                     'Versao='           + Boleto.ListaRetornoWeb[i].Header.Versao + sLineBreak +
                     'Autenticacao='     + Boleto.ListaRetornoWeb[i].Header.Autenticacao + sLineBreak +
                     'Usuario_Servico='  + Boleto.ListaRetornoWeb[i].Header.Usuario_Servico + sLineBreak +
                     'Usuario='          + Boleto.ListaRetornoWeb[i].Header.Usuario + sLineBreak +
                     'Operacao='         + TipoOperacaoToStr(Boleto.ListaRetornoWeb[i].Header.Operacao) + sLineBreak +
                     'Indice='           + IntToStr(Boleto.ListaRetornoWeb[i].Header.Indice) + sLineBreak +
                     'Sistema_Origem='   + Boleto.ListaRetornoWeb[i].Header.Sistema_Origem + sLineBreak +
                     'Agencia='          + Boleto.ListaRetornoWeb[i].Header.Agencia + sLineBreak +
                     'ID_Origem='        + Boleto.ListaRetornoWeb[i].Header.Id_Origem + sLineBreak +
                     'Data_Hora='        +FormatDateTime('dd/mm/yyyy hh:nn:ss',Boleto.ListaRetornoWeb[i].Header.Data_Hora) + sLineBreak +
                     'ID_Processo='      + Boleto.ListaRetornoWeb[i].Header.Id_Processo + sLineBreak +
                     'DADOS'             + sLineBreak +
                     'Excessao='         +Boleto.ListaRetornoWeb[i].DadosRet.Excecao + sLineBreak +
                     'CONTROLE_NEGOCIAL' + sLineBreak +
                     'Origem_Retorno='   + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.OriRetorno + sLineBreak +
                     'NSU='              + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.NSU + sLineBreak +
                     'Cod_Retorno='      + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.CodRetorno + sLineBreak +
                     'Msg_Retorno='      + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.Retorno + sLineBreak +
                     'COMPROVANTE'       + sLineBreak +
                     'Data='             +  FormatDateTime('dd/mm/yyyy', Boleto.ListaRetornoWeb[i].DadosRet.Comprovante.Data) + sLineBreak +
                     'Hora='             +  Boleto.ListaRetornoWeb[i].DadosRet.Comprovante.Hora + sLineBreak +
                     'ID_BOLETO'         + sLineBreak +
                     'Codigo_Barras='    + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.CodBarras + sLineBreak +
                     'Linha_Digitavel='  + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.LinhaDig + sLineBreak +
                     'Nosso_Numero='     + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.NossoNum + sLineBreak +
                     'URL='              + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.URL + sLineBreak +
                     'CONSULTA_BOLETO'   + sLineBreak +
                     'Numero_Documento=' + Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NumeroDocumento + sLineBreak +
                     'Data_Vencimento='  + FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Vencimento) + sLineBreak +
                     'Valor='            + CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDocumento) + sLineBreak
                      );
        if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then
        begin
         SLRemessa.Add('TITULO_RETORNO'            + sLineBreak  +
          'vencimento_titulo='                     +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Vencimento)+ sLineBreak +
          'data_processamento='                    +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.DataProcessamento)+ sLineBreak +
          'data_emissao='                          +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.DataDocumento)+ sLineBreak +
          'tipo_carteira_titulo='                  +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Carteira+ sLineBreak +
          'nosso_numero='                          +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NossoNumero+ sLineBreak +
          'NossoNumeroCorrespondente='             +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NossoNumeroCorrespondente+ sLineBreak +
          'seu_numero='                            +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.SeuNumero+ sLineBreak +
          'especie='                               +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.EspecieDoc+ sLineBreak +
          'codigo_barras='                         +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras+ sLineBreak +
          'numero_linha_digitavel='                +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.LinhaDig+ sLineBreak +
          'local_pagamento='                       +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Mensagem.Text+ sLineBreak +
          'uso_banco='                             +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.UsoBanco+ sLineBreak +
          'valor_titulo='                          +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDocumento)+ sLineBreak +
          'valor_desconto='                        +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDesconto)+ sLineBreak +
          'valor_outra_deducao='                   +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDespesaCobranca)+ sLineBreak +
          'valor_juro_multa='                      +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorMoraJuros)+ sLineBreak +
          'valor_outro_acrescimo='                 +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorOutrosCreditos)+ sLineBreak +
          'valor_total_cobrado='                   +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorPago) + sLineBreak +
          'EMV (QrCode) ='                         +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.EMV + sLineBreak +
          'texto_informacao_cliente_beneficiario=' +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Informativo.Text  );

          if frdm.Filtractarec(' and Numnf||''-''||nparcela ='+Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.SeuNumero.QuotedString) > 0 Then
          Begin
              with Boleto.ListaRetornoWeb[i].DadosRet.TituloRet do
              begin
                 frdm.qrctarec.Edit;
                 frdm.qrCtarecIDCONTA.AsInteger := frdm.qrContaIDCONTA.AsInteger;
                 frdm.qrCtarecNOSSONUMERO.AsString := NossoNumero;
                 frdm.qrCtarecCODIGOSOLICITACAO.AsString := NossoNumeroCorrespondente;
                 frdm.qrCtarecCODIGOBARRAS.AsString := CodBarras;
                 frdm.qrCtarecLINHADIGITAVEL.AsString := LinhaDig;
                 frdm.qrCtarecSTATUS_API.asstring :=  EstadoTituloCobranca;
                 frdm.qrCtarecSTSBOLETO.AsString  := 'T';
                 frdm.qrCtarecQRCODE.AsString := EMV;
                 frdm.qrCtarecTXID.AsString   := TxId;
                 frdm.SalvaDataSet(frdm.qrctarec);
              end;
          End;
        end;
      end;
      SLRemessa.SaveToFile( arqRetorno+'RetornoRegistro.txt' );
    finally
      SLRemessa.Free;
    end;
   // ShowMessage('Retorno Envio gerado em: '+ arqRetorno+'RetornoRegistro.txt' );

  end;

end;

essa a parte que eu faço o envio .. 

Eu acho que é algo nesta parte if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then

 

 

 

Editado por Filippe Maymone
Postado
1 hora atrás, Filippe Maymone disse:
procedure EnviarBoletos;
var
  SLRemessa: TStringList;
  i, j: Integer;
  Boleto : TACBrBoleto;
begin
  Boleto := FACBrBoleto;
  if not ConfirmMessage('Deseja enviar '+Boleto.ListadeBoletos.Count.ToString + '  Boleto(s)', True ) then
    Abort;

try
  //Função de Envio
  MostraEspera('Enviando boletos');
  Boleto.Configuracoes.WebService.Operacao := tpInclui;

  Boleto.Enviar; // <<< retorna como false se o httpresult code for diferente de 200,201,202
  //Verifica Lista com os retornos
finally
  fechaespera;
end;


  if Boleto.TotalListaRetornoWeb > 0 then
  begin
    SLRemessa := TStringList.Create;
    try
      for i:= 0 to Pred(Boleto.TotalListaRetornoWeb) do
      begin
        //Ler todos os campos da classe Retorno
        SLRemessa.Add('Cod_Retorno='+ Boleto.ListaRetornoWeb[i].CodRetorno + sLineBreak +
                      'Msg_Retorno='+ Boleto.ListaRetornoWeb[i].MsgRetorno + sLineBreak +
                      'Ori_Retorno='+ Boleto.ListaRetornoWeb[i].OriRetorno + sLineBreak +
                      'HTTP_Result='+ IntToStr(Boleto.ListaRetornoWeb[i].HTTPResultCode) + sLineBreak +
                      'JSON='+ Boleto.ListaRetornoWeb[i].JSON);

        if Boleto.ListaRetornoWeb[i].ListaRejeicao.Count > 0 then
        begin
         for j:= 0 to Pred(Boleto.ListaRetornoWeb[i].ListaRejeicao.Count) do
         begin
           SLRemessa.Add('[Rejeicao'   +IntToStr(j)+']' + sLineBreak +
                         'Campo='      + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Campo + sLineBreak +
                         'Codigo='     + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Codigo + sLineBreak +
                         'Versao='     + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Versao + sLineBreak +
                         'Mensagem='   + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Mensagem + sLineBreak +
                         'Ocorrencia=' + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Ocorrencia + sLineBreak +
                         'Valor='      + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Valor + sLineBreak );
         end;
        end;

         SLRemessa.Add('HEADER'          + sLineBreak +
                     'Versao='           + Boleto.ListaRetornoWeb[i].Header.Versao + sLineBreak +
                     'Autenticacao='     + Boleto.ListaRetornoWeb[i].Header.Autenticacao + sLineBreak +
                     'Usuario_Servico='  + Boleto.ListaRetornoWeb[i].Header.Usuario_Servico + sLineBreak +
                     'Usuario='          + Boleto.ListaRetornoWeb[i].Header.Usuario + sLineBreak +
                     'Operacao='         + TipoOperacaoToStr(Boleto.ListaRetornoWeb[i].Header.Operacao) + sLineBreak +
                     'Indice='           + IntToStr(Boleto.ListaRetornoWeb[i].Header.Indice) + sLineBreak +
                     'Sistema_Origem='   + Boleto.ListaRetornoWeb[i].Header.Sistema_Origem + sLineBreak +
                     'Agencia='          + Boleto.ListaRetornoWeb[i].Header.Agencia + sLineBreak +
                     'ID_Origem='        + Boleto.ListaRetornoWeb[i].Header.Id_Origem + sLineBreak +
                     'Data_Hora='        +FormatDateTime('dd/mm/yyyy hh:nn:ss',Boleto.ListaRetornoWeb[i].Header.Data_Hora) + sLineBreak +
                     'ID_Processo='      + Boleto.ListaRetornoWeb[i].Header.Id_Processo + sLineBreak +
                     'DADOS'             + sLineBreak +
                     'Excessao='         +Boleto.ListaRetornoWeb[i].DadosRet.Excecao + sLineBreak +
                     'CONTROLE_NEGOCIAL' + sLineBreak +
                     'Origem_Retorno='   + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.OriRetorno + sLineBreak +
                     'NSU='              + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.NSU + sLineBreak +
                     'Cod_Retorno='      + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.CodRetorno + sLineBreak +
                     'Msg_Retorno='      + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.Retorno + sLineBreak +
                     'COMPROVANTE'       + sLineBreak +
                     'Data='             +  FormatDateTime('dd/mm/yyyy', Boleto.ListaRetornoWeb[i].DadosRet.Comprovante.Data) + sLineBreak +
                     'Hora='             +  Boleto.ListaRetornoWeb[i].DadosRet.Comprovante.Hora + sLineBreak +
                     'ID_BOLETO'         + sLineBreak +
                     'Codigo_Barras='    + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.CodBarras + sLineBreak +
                     'Linha_Digitavel='  + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.LinhaDig + sLineBreak +
                     'Nosso_Numero='     + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.NossoNum + sLineBreak +
                     'URL='              + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.URL + sLineBreak +
                     'CONSULTA_BOLETO'   + sLineBreak +
                     'Numero_Documento=' + Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NumeroDocumento + sLineBreak +
                     'Data_Vencimento='  + FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Vencimento) + sLineBreak +
                     'Valor='            + CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDocumento) + sLineBreak
                      );
        if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then
        begin
         SLRemessa.Add('TITULO_RETORNO'            + sLineBreak  +
          'vencimento_titulo='                     +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Vencimento)+ sLineBreak +
          'data_processamento='                    +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.DataProcessamento)+ sLineBreak +
          'data_emissao='                          +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.DataDocumento)+ sLineBreak +
          'tipo_carteira_titulo='                  +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Carteira+ sLineBreak +
          'nosso_numero='                          +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NossoNumero+ sLineBreak +
          'NossoNumeroCorrespondente='             +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NossoNumeroCorrespondente+ sLineBreak +
          'seu_numero='                            +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.SeuNumero+ sLineBreak +
          'especie='                               +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.EspecieDoc+ sLineBreak +
          'codigo_barras='                         +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras+ sLineBreak +
          'numero_linha_digitavel='                +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.LinhaDig+ sLineBreak +
          'local_pagamento='                       +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Mensagem.Text+ sLineBreak +
          'uso_banco='                             +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.UsoBanco+ sLineBreak +
          'valor_titulo='                          +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDocumento)+ sLineBreak +
          'valor_desconto='                        +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDesconto)+ sLineBreak +
          'valor_outra_deducao='                   +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDespesaCobranca)+ sLineBreak +
          'valor_juro_multa='                      +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorMoraJuros)+ sLineBreak +
          'valor_outro_acrescimo='                 +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorOutrosCreditos)+ sLineBreak +
          'valor_total_cobrado='                   +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorPago) + sLineBreak +
          'EMV (QrCode) ='                         +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.EMV + sLineBreak +
          'texto_informacao_cliente_beneficiario=' +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Informativo.Text  );

          if frdm.Filtractarec(' and Numnf||''-''||nparcela ='+Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.SeuNumero.QuotedString) > 0 Then
          Begin
              with Boleto.ListaRetornoWeb[i].DadosRet.TituloRet do
              begin
                 frdm.qrctarec.Edit;
                 frdm.qrCtarecIDCONTA.AsInteger := frdm.qrContaIDCONTA.AsInteger;
                 frdm.qrCtarecNOSSONUMERO.AsString := NossoNumero;
                 frdm.qrCtarecCODIGOSOLICITACAO.AsString := NossoNumeroCorrespondente;
                 frdm.qrCtarecCODIGOBARRAS.AsString := CodBarras;
                 frdm.qrCtarecLINHADIGITAVEL.AsString := LinhaDig;
                 frdm.qrCtarecSTATUS_API.asstring :=  EstadoTituloCobranca;
                 frdm.qrCtarecSTSBOLETO.AsString  := 'T';
                 frdm.qrCtarecQRCODE.AsString := EMV;
                 frdm.qrCtarecTXID.AsString   := TxId;
                 frdm.SalvaDataSet(frdm.qrctarec);
              end;
          End;
        end;
      end;
      SLRemessa.SaveToFile( arqRetorno+'RetornoRegistro.txt' );
    finally
      SLRemessa.Free;
    end;
   // ShowMessage('Retorno Envio gerado em: '+ arqRetorno+'RetornoRegistro.txt' );

  end;

end;

essa a parte que eu faço o envio .. 

Eu acho que é algo nesta parte if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then

 

 

 

Mano, tenta depurar com esse retorno: IDBoleto

 

  if ABoleto.ListaRetornoWeb[I].DadosRet.IDBoleto.IDBoleto <> '' then
         ABoletoApi.CodigoSolicitacao := ABoleto.ListaRetornoWeb[I].DadosRet.IDBoleto.IDBoleto;

      ABoletoApi.NossoNumeroFormatado := ABoleto.ListaRetornoWeb[I].DadosRet.IDBoleto.NossoNum;
      ABoletoApi.CodigoBarras         := ABoleto.ListaRetornoWeb[I].DadosRet.IDBoleto.CodBarras;
      ABoletoApi.LinhaDigitavel       := ABoleto.ListaRetornoWeb[I].DadosRet.IDBoleto.LinhaDig;
      ABoletoApi.TxPIX                := ABoleto.ListaRetornoWeb[I].DadosRet.TituloRet.TxId;
      ABoletoApi.UrlPIX               := ABoleto.ListaRetornoWeb[I].DadosRet.TituloRet.EMV; // inter está vindo aqui
      if ABoletoApi.UrlPIX = '' then
         ABoletoApi.UrlPIX := ABoleto.ListaRetornoWeb[I].DadosRet.TituloRet.UrlPIX;

      if ABoletoApi.CodigoSolicitacao = '' then
         ABoletoApi.CodigoSolicitacao := ABoleto.ListaRetornoWeb[I].DadosRet.TituloRet.NossoNumeroCorrespondente;

      // separar dados - inter vem junto
      ABoletoApi.NumeroBoleto := Copy(ABoletoApi.NossoNumeroFormatado, 1, ABoletoApi.NossoNumeroFormatado.Length - 1);
      ABoletoApi.DVBoleto     := Copy(ABoletoApi.NossoNumeroFormatado, ABoletoApi.NossoNumeroFormatado.Length, 1);
 

  • Consultores
Postado
8 horas atrás, Filippe Maymone disse:
procedure EnviarBoletos;
var
  SLRemessa: TStringList;
  i, j: Integer;
  Boleto : TACBrBoleto;
begin
  Boleto := FACBrBoleto;
  if not ConfirmMessage('Deseja enviar '+Boleto.ListadeBoletos.Count.ToString + '  Boleto(s)', True ) then
    Abort;

try
  //Função de Envio
  MostraEspera('Enviando boletos');
  Boleto.Configuracoes.WebService.Operacao := tpInclui;

  Boleto.Enviar; // <<< retorna como false se o httpresult code for diferente de 200,201,202
  //Verifica Lista com os retornos
finally
  fechaespera;
end;


  if Boleto.TotalListaRetornoWeb > 0 then
  begin
    SLRemessa := TStringList.Create;
    try
      for i:= 0 to Pred(Boleto.TotalListaRetornoWeb) do
      begin
        //Ler todos os campos da classe Retorno
        SLRemessa.Add('Cod_Retorno='+ Boleto.ListaRetornoWeb[i].CodRetorno + sLineBreak +
                      'Msg_Retorno='+ Boleto.ListaRetornoWeb[i].MsgRetorno + sLineBreak +
                      'Ori_Retorno='+ Boleto.ListaRetornoWeb[i].OriRetorno + sLineBreak +
                      'HTTP_Result='+ IntToStr(Boleto.ListaRetornoWeb[i].HTTPResultCode) + sLineBreak +
                      'JSON='+ Boleto.ListaRetornoWeb[i].JSON);

        if Boleto.ListaRetornoWeb[i].ListaRejeicao.Count > 0 then
        begin
         for j:= 0 to Pred(Boleto.ListaRetornoWeb[i].ListaRejeicao.Count) do
         begin
           SLRemessa.Add('[Rejeicao'   +IntToStr(j)+']' + sLineBreak +
                         'Campo='      + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Campo + sLineBreak +
                         'Codigo='     + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Codigo + sLineBreak +
                         'Versao='     + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Versao + sLineBreak +
                         'Mensagem='   + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Mensagem + sLineBreak +
                         'Ocorrencia=' + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Ocorrencia + sLineBreak +
                         'Valor='      + Boleto.ListaRetornoWeb[i].ListaRejeicao[j].Valor + sLineBreak );
         end;
        end;

         SLRemessa.Add('HEADER'          + sLineBreak +
                     'Versao='           + Boleto.ListaRetornoWeb[i].Header.Versao + sLineBreak +
                     'Autenticacao='     + Boleto.ListaRetornoWeb[i].Header.Autenticacao + sLineBreak +
                     'Usuario_Servico='  + Boleto.ListaRetornoWeb[i].Header.Usuario_Servico + sLineBreak +
                     'Usuario='          + Boleto.ListaRetornoWeb[i].Header.Usuario + sLineBreak +
                     'Operacao='         + TipoOperacaoToStr(Boleto.ListaRetornoWeb[i].Header.Operacao) + sLineBreak +
                     'Indice='           + IntToStr(Boleto.ListaRetornoWeb[i].Header.Indice) + sLineBreak +
                     'Sistema_Origem='   + Boleto.ListaRetornoWeb[i].Header.Sistema_Origem + sLineBreak +
                     'Agencia='          + Boleto.ListaRetornoWeb[i].Header.Agencia + sLineBreak +
                     'ID_Origem='        + Boleto.ListaRetornoWeb[i].Header.Id_Origem + sLineBreak +
                     'Data_Hora='        +FormatDateTime('dd/mm/yyyy hh:nn:ss',Boleto.ListaRetornoWeb[i].Header.Data_Hora) + sLineBreak +
                     'ID_Processo='      + Boleto.ListaRetornoWeb[i].Header.Id_Processo + sLineBreak +
                     'DADOS'             + sLineBreak +
                     'Excessao='         +Boleto.ListaRetornoWeb[i].DadosRet.Excecao + sLineBreak +
                     'CONTROLE_NEGOCIAL' + sLineBreak +
                     'Origem_Retorno='   + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.OriRetorno + sLineBreak +
                     'NSU='              + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.NSU + sLineBreak +
                     'Cod_Retorno='      + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.CodRetorno + sLineBreak +
                     'Msg_Retorno='      + Boleto.ListaRetornoWeb[i].DadosRet.ControleNegocial.Retorno + sLineBreak +
                     'COMPROVANTE'       + sLineBreak +
                     'Data='             +  FormatDateTime('dd/mm/yyyy', Boleto.ListaRetornoWeb[i].DadosRet.Comprovante.Data) + sLineBreak +
                     'Hora='             +  Boleto.ListaRetornoWeb[i].DadosRet.Comprovante.Hora + sLineBreak +
                     'ID_BOLETO'         + sLineBreak +
                     'Codigo_Barras='    + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.CodBarras + sLineBreak +
                     'Linha_Digitavel='  + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.LinhaDig + sLineBreak +
                     'Nosso_Numero='     + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.NossoNum + sLineBreak +
                     'URL='              + Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto.URL + sLineBreak +
                     'CONSULTA_BOLETO'   + sLineBreak +
                     'Numero_Documento=' + Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NumeroDocumento + sLineBreak +
                     'Data_Vencimento='  + FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Vencimento) + sLineBreak +
                     'Valor='            + CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDocumento) + sLineBreak
                      );
        if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then
        begin
         SLRemessa.Add('TITULO_RETORNO'            + sLineBreak  +
          'vencimento_titulo='                     +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Vencimento)+ sLineBreak +
          'data_processamento='                    +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.DataProcessamento)+ sLineBreak +
          'data_emissao='                          +FormatDateTime('dd/mm/yyyy',Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.DataDocumento)+ sLineBreak +
          'tipo_carteira_titulo='                  +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Carteira+ sLineBreak +
          'nosso_numero='                          +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NossoNumero+ sLineBreak +
          'NossoNumeroCorrespondente='             +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.NossoNumeroCorrespondente+ sLineBreak +
          'seu_numero='                            +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.SeuNumero+ sLineBreak +
          'especie='                               +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.EspecieDoc+ sLineBreak +
          'codigo_barras='                         +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras+ sLineBreak +
          'numero_linha_digitavel='                +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.LinhaDig+ sLineBreak +
          'local_pagamento='                       +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Mensagem.Text+ sLineBreak +
          'uso_banco='                             +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.UsoBanco+ sLineBreak +
          'valor_titulo='                          +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDocumento)+ sLineBreak +
          'valor_desconto='                        +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDesconto)+ sLineBreak +
          'valor_outra_deducao='                   +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorDespesaCobranca)+ sLineBreak +
          'valor_juro_multa='                      +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorMoraJuros)+ sLineBreak +
          'valor_outro_acrescimo='                 +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorOutrosCreditos)+ sLineBreak +
          'valor_total_cobrado='                   +CurrToStr(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.ValorPago) + sLineBreak +
          'EMV (QrCode) ='                         +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.EMV + sLineBreak +
          'texto_informacao_cliente_beneficiario=' +Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.Informativo.Text  );

          if frdm.Filtractarec(' and Numnf||''-''||nparcela ='+Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.SeuNumero.QuotedString) > 0 Then
          Begin
              with Boleto.ListaRetornoWeb[i].DadosRet.TituloRet do
              begin
                 frdm.qrctarec.Edit;
                 frdm.qrCtarecIDCONTA.AsInteger := frdm.qrContaIDCONTA.AsInteger;
                 frdm.qrCtarecNOSSONUMERO.AsString := NossoNumero;
                 frdm.qrCtarecCODIGOSOLICITACAO.AsString := NossoNumeroCorrespondente;
                 frdm.qrCtarecCODIGOBARRAS.AsString := CodBarras;
                 frdm.qrCtarecLINHADIGITAVEL.AsString := LinhaDig;
                 frdm.qrCtarecSTATUS_API.asstring :=  EstadoTituloCobranca;
                 frdm.qrCtarecSTSBOLETO.AsString  := 'T';
                 frdm.qrCtarecQRCODE.AsString := EMV;
                 frdm.qrCtarecTXID.AsString   := TxId;
                 frdm.SalvaDataSet(frdm.qrctarec);
              end;
          End;
        end;
      end;
      SLRemessa.SaveToFile( arqRetorno+'RetornoRegistro.txt' );
    finally
      SLRemessa.Free;
    end;
   // ShowMessage('Retorno Envio gerado em: '+ arqRetorno+'RetornoRegistro.txt' );

  end;

end;

essa a parte que eu faço o envio .. 

Eu acho que é algo nesta parte if NaoEstaVazio(Boleto.ListaRetornoWeb[i].DadosRet.TituloRet.CodBarras) then

 

 

 

porque tu grava exatamente o ini do exemplo. tu não precisa disso dali. grava só em suas tabelas o que precisa pra atualizar seu titulo e guardar os dados para reimprimir

 

Consultora ACBr Pro

Juliomar Marchetti

Ajude o Projeto ACBr crescer - Seja Pro

discord: juliomar
telegram: juliomar
e-mail: [email protected]
http://www.juliomarmarchetti.com.br

 

MVP_NewLogo_100x100_Transparent-02.png
Projeto ACBr - A maior comunidade Open Source de Automação Comercial do Brasil


Participe de nosso canal no Discord e fique ainda mais próximo da Comunidade !!

Postado

@Juliomar Marchettideixei pra ir vendo o que esta ocorrendo por enquanto que esta com problema..
mas agora gerei um boleto do meu computador e comparei os logs.

 

E notei no log que gero no cliente esta ficando em "situacao":"EM_PROCESSAMENTO"

Acho que é a o problema... 

mas por que no cliente esta ficando em processamento... 

Eu li que quando oesta e processamento, temos que fazer uma consulta detalhada, mas como entrou em processamento não pego o codigo ai não consigo consultar ... 

 

  • Consultores
Postado

que código?

ele retornou isso quer dizer que ele já retornou o nosso numero basta pegar ele 

preencher o titulo e consultar ele 

 

Consultora ACBr Pro

Juliomar Marchetti

Ajude o Projeto ACBr crescer - Seja Pro

discord: juliomar
telegram: juliomar
e-mail: [email protected]
http://www.juliomarmarchetti.com.br

 

MVP_NewLogo_100x100_Transparent-02.png
Projeto ACBr - A maior comunidade Open Source de Automação Comercial do Brasil


Participe de nosso canal no Discord e fique ainda mais próximo da Comunidade !!

Postado

Código que eu estava falando era o codigoCorrespondente que eu utilizo pra fazer a consulta detalhada .. 
 

Agora entendi.. que ele esta em processamento . .

Ai consigo pegar o retorno em Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto  NossoNum codigo de barras ... 

so que no Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto .. não tenho por exemplo o seunumero . .ele não retorna ... ai não consigo identificar esse titulo dentro da minha base .... para poder gravar o nossonumero no banco .. .

 

Postado

Como consultar o título usando o NossoCodigoCorrespondente? 

Quando gero o boleto ele vem com o QrCode PIX porém quando vou pagar ele exibe: "chave PIX Identificada" e ao tentar pagar ele reporta: "Chave não cadastrada no PIX"

Seria o mesmo problema o meu retorno exibem "EM_PROCESSAMENTO"

  • Curtir 1
Postado (editado)

Na verdade, existe um ciclo que eu tive que programar no meu sistema, por conta do inter, ele nao bate de cara e devolve tudo. Repara meu código:

TBoletoAPI = record
    CodigoSolicitacao: string;
    NossoNumeroFormatado: string;
    CodigoBarras: string;
    LinhaDigitavel: string;
    TxPIX: string;
    UrlPIX: string;
    NumeroBoleto: string;
    DVBoleto: string;

    procedure Limpar;
  end;

FBoletoApi: TBoletoAPI; // tem os dados do boleto que uso para salvar no meu banco e carrego quando começo processar, abaixo o codigo do inter gravado na primeira passada.

FBoletoApi.CodigoSolicitacao := AFDReceber.FieldByName('COD_SOLICITACAO_BOL_REC').AsString;

 

// Anterior
        LCodigoSolicitacaoTmp := FBoletoApi.CodigoSolicitacao;
        AMsgErro              := '';
        LFlagEnviar           := True;

// bloco tratar, se gravou apenas o numero correspondente:

        if (FDSServBanc.FieldByName('API_CONS_APOS_INCLUIR_SER').AsString = 'S') and
         (FBoletoApi.CodigoSolicitacao <> '') and
         (FBoletoApi.NumeroBoleto = '') then
        begin
          // Se deu erro anterior, mas gravou o recibo de solicitacao, consultar - inter tem isso = se ja foi enviado, nao pode mandar de novo
          Boleto.Configuracoes.WebService.Operacao := TOperacao.tpConsultaDetalhe;
          Boleto.Enviar;
          AMsgErro    := LerRetornoDeAPI(Boleto, FBoletoApi);
          LFlagEnviar := False; // não enviar de novo

          if FBoletoApi.CodigoSolicitacao <> '' then
             LCodigoSolicitacaoTmp := FBoletoApi.CodigoSolicitacao;
        end;

        // TODOS DEMAIS BANCOS, interv2 ou interv3, se nao tiver ainda o recibo
        if (AMsgErro = '') and LFlagEnviar then
        begin
          Boleto.Configuracoes.WebService.Operacao := TOperacao.tpInclui;
          Boleto.Enviar;
          AMsgErro := LerRetornoDeAPI(Boleto, FBoletoApi);

          if FBoletoApi.CodigoSolicitacao <> '' then
             LCodigoSolicitacaoTmp := FBoletoApi.CodigoSolicitacao;
        end;

        // esperar entre transmissao
        if LFlagEnviar and (FDSServBanc.FieldByName('API_CONS_APOS_INCLUIR_SER').AsString = 'S') and
         (FDSServBanc.FieldByName('API_TEMPO_CONS_SER').AsInteger > 0) and (FBoletoApi.NumeroBoleto = '') then
        begin
          Sleep(FDSServBanc.FieldByName('API_TEMPO_CONS_SER').AsInteger);
        end;

        // inter: Se antes nao tinha solicitacao, agora tem, e ainda nao pegou o retorno do boleto, pegar
        // c6, vem o retorno sem precisar consultar, se tem o boleto, nao pode consultar, dá erro
        if (AMsgErro = '') and (FDSServBanc.FieldByName('API_CONS_APOS_INCLUIR_SER').AsString = 'S') and // inter v3
         (LCodigoSolicitacaoTmp = '') and
         (FBoletoApi.CodigoSolicitacao <> '') and
         (FBoletoApi.NumeroBoleto = '') then
        begin
          Boleto.Configuracoes.WebService.Operacao := TOperacao.tpConsultaDetalhe;
          Boleto.Enviar;
          AMsgErro := LerRetornoDeAPI(Boleto, FBoletoApi);

          if (LCodigoSolicitacaoTmp = '') and (FBoletoApi.CodigoSolicitacao <> '') then
             LCodigoSolicitacaoTmp := FBoletoApi.CodigoSolicitacao;

          if (LCodigoSolicitacaoTmp = '') and (FBoletoApi.CodigoSolicitacao <> '') then
             LCodigoSolicitacaoTmp := FBoletoApi.CodigoSolicitacao;
        end;

E aumente seu timeout, o padrao do componente tem dias que bixa tudo, eu coloquei 10000 no meu, mas tem cliente que ja botei 15000. Padrão do ACBr: 5000

Editado por Antonio Gomes
Postado

@Antonio Gomes agora acho que deu uma clareada .. 
O Inter tem esse problema de ficar em processamento e não retorno as informações do boleto .. 
ai voce voce pega e faz uma consulta detalhada do titulo... 
So ficou uma duvida .. quando ele fica em processamento, onde voce consegue pegar o CodigoSolicitacao 

Vi que a quando fica em processamento consigo as informações do boleto em 

Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto 

que não tem o codigo da solicitação... 

 

 

Postado
1 minuto atrás, Filippe Maymone disse:

@Antonio Gomes agora acho que deu uma clareada .. 
O Inter tem esse problema de ficar em processamento e não retorno as informações do boleto .. 
ai voce voce pega e faz uma consulta detalhada do titulo... 
So ficou uma duvida .. quando ele fica em processamento, onde voce consegue pegar o CodigoSolicitacao 

Vi que a quando fica em processamento consigo as informações do boleto em 

Boleto.ListaRetornoWeb[i].DadosRet.IDBoleto 

que não tem o codigo da solicitação... 

 

 

Então, a V1 deles, era top, na V2 que apareceu isso. Não é igual alguns outros bancos, que bate e registra, parece que o sistema deles lá é meio lezado tá. E tem dias que não autoriza, cai, pq eu tenho um agendamento no cliente todo dia de consultar e dar baixa, e tem dias que o cliente chama, que nao rodou baixa do financeiro, dai eu rastreio, e está com erro 400 ou 500. E´ raro, mas acontece. Uma boa pedida, é sempre dar uma sondada naquele arquivo de particularidades, mas os problemas a gente vai pegando quando o programa vai para  linha de produção.

Postado

é então .. eu rodando aqui nenhum caiu em processamento . .vai tudo certinho .. 
Ai rodei aqui em produção, peguei com o cliente os boletos do dia ... e gerei 10 boletos em produção na minha maquina e foi que uma beleza .. auuhahua

ai não consigo simular essa situação de "em processamento" complicado.. 

e fui iniciar meu desenvolvimento logo pelo banco Inter .. auhuahuhauhauhhua 

Postado

Voces não vão acreditar .. 
Esse cliente eles trabalhando em Home office. 

E acessão via VPN uma maquina windows 10 via Terminal service.

ai fui tirar a duvida, instalei o sistema na maquina local, fora da VPN... e pra surpresa de 0 pessoas, gerou bonitinho sem problema nenhuma... 

 

 

  • Haha 1
Postado
1 hora atrás, Filippe Maymone disse:

Voces não vão acreditar .. 
Esse cliente eles trabalhando em Home office. 

E acessão via VPN uma maquina windows 10 via Terminal service.

ai fui tirar a duvida, instalei o sistema na maquina local, fora da VPN... e pra surpresa de 0 pessoas, gerou bonitinho sem problema nenhuma... 

 

 

é sob vpn nao sei o comportamento, é 443 a porta ne...

Postado

Não consigo gerar um QrCode válido no boleto do Inter:

          if Titulo.NossoNumeroCorrespondente <> '' then
          begin
            dm.Boleto.Configuracoes.WebService.Operacao := tpConsultaDetalhe;

            dm.Boleto.Enviar;

            if dm.Boleto.ListaRetornoWeb[0].HTTPResultCode = 200 then
            begin
              if Trim(dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.NossoNumeroCorrespondente) <> '' then
              begin
                lSituacao             := dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.CodigoEstadoTituloCobranca;

                if dm.Boleto.ListaRetornoWeb[0].DadosRet.IDBoleto.IDBoleto <> '' then
                  lCodigoSolicitacao    := dm.Boleto.ListaRetornoWeb[0].DadosRet.IDBoleto.IDBoleto;

                lNossoNumeroFormatado := dm.Boleto.ListaRetornoWeb[0].DadosRet.IDBoleto.NossoNum;
                lCodigoBarras         := dm.Boleto.ListaRetornoWeb[0].DadosRet.IDBoleto.CodBarras;
                lLinhaDigitavel       := dm.Boleto.ListaRetornoWeb[0].DadosRet.IDBoleto.LinhaDig;

                lUrl                  := dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.URL;

                lTxPIX                := dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.TxId;
                lUrlPIX               := dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.EMV;

                if lUrlPIX = '' then
                  lUrlPIX             := dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.UrlPIX;

                if lCodigoSolicitacao = '' then
                  lCodigoSolicitacao := dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.NossoNumeroCorrespondente;

                // e na hora de imprimir, atribui no titulo, se tiver pix - gravado no seu receber a url, claro

                if ACBrBoletoPIXQRCode = Nil then
                  ACBrBoletoPIXQRCode := TACBrBoletoPIXQRCode.Create;

                ACBrBoletoPIXQRCode.url  := lUrlPix;
                ACBrBoletoPIXQRCode.txId := lTxPix;
                ACBrBoletoPIXQRCode.emv  := ''; //lCodigoSolicitacao;

                ACBrBoletoPIXQRCode.PIXQRCodeDinamico(lUrlPIX, lTxPIX, Titulo);

                Titulo.NossoNumero    := lNossoNumeroFormatado;
                Titulo.QrCode         := ACBrBoletoPixQRCode;

              end;
            end;
          end;
 

Levando em consideração que para o banco Inter a UrlPix vem dm.Boleto.ListaRetornoWeb[0].DadosRet.TituloRet.EMV  dá erro:

raised exception class EACBrPixException with message 'O tamanho máximo para conteúdo EMV é 99'.

Se fizer assim:

                ACBrBoletoPIXQRCode.url     := lCodigoSolicitacao; // NossoNumeroCorrespondente
                ACBrBoletoPIXQRCode.txId   := lTxPix;
                ACBrBoletoPIXQRCode.emv  := lCodigoSolicitacao; // NossoNumeroCorrespondente

                ACBrBoletoPIXQRCode.PIXQRCodeDinamico(lUrlPIX, lTxPIX, Titulo);

Gera um QrCode Inválido

Alguém pode me mostrar o erro?

 

Postado

Dessa forma:

 

              if ACBrBoletoPIXQRCode = Nil then
                  ACBrBoletoPIXQRCode := TACBrBoletoPIXQRCode.Create;

                ACBrBoletoPIXQRCode.url  := lUrlPix;
                ACBrBoletoPIXQRCode.txId := lTxPix;
                ACBrBoletoPIXQRCode.emv  := lCodigoSolicitacao;

                ACBrBoletoPIXQRCode.PIXQRCodeDinamico(lCodigoSolicitacao, lTxPIX, Titulo);

                Titulo.NossoNumero    := lNossoNumeroFormatado;
                Titulo.QrCode             := ACBrBoletoPixQRCode;
 

Gera Inválido

 

  • Este tópico foi criado há 374 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar Agora
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.

The popup will be closed in 10 segundos...