Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Samuel-Oliveira/72f88a91c72465e038dbecd065fe1e12 to your computer and use it in GitHub Desktop.
Save Samuel-Oliveira/72f88a91c72465e038dbecd065fe1e12 to your computer and use it in GitHub Desktop.
Alteração QrCode 1 para 2
Apartir de 01/10/2018 Somente será aceito QrCode versão 2. Então apartir da versão 4.00.7 Somente trabalharemos com esta versão.
Cpomo essa modificação, teremos um Qrcode diferente para Envio Online e Envio OffLIne.
Segua abaixo os Exemplos para cada Caso:
//QRCODE
String qrCode = NFCeUtil.getCodeQRCode(
infNFe.getId().substring(3),
config.getAmbiente(),
idToken,
csc,
WebServiceUtil.getUrl(config,ConstantesUtil.NFCE, ConstantesUtil.SERVICOS.URL_QRCODE));
//QRCODE OFFLine
String qrCode = NFCeUtil.getCodeQRCodeContingencia(
infNFe.getId().substring(3),
config.getAmbiente(),
ide.getDhEmi(),
total.getICMSTot().getVNF(),
Base64.getEncoder().encodeToString(enviNFe.getNFe().get(0).getSignature().getSignedInfo().getReference().getDigestValue()),
idToken,
csc,
WebServiceUtil.getUrl(config,ConstantesUtil.NFCE, ConstantesUtil.SERVICOS.URL_QRCODE));
@resplandes
Copy link

Show

@resplandes
Copy link

Ao meu ver Samuel ficou 100% mais simplificado, perfeito amigão, obrigado!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment