Repository navigation
Conversation
SEFAZ drops only non-significant zeros. Removing every zero turned id 100 into 1, so the QR hash was for the wrong token.
|
Confirmo o bug em uso real com NFC-e em SP, e a correção deste PR resolve. O
Com o id errado o Rodei o teste deste PR localmente: falha no A CI vermelha não vem do PR: o passo @felps-dev, consegue avaliar o merge? Obrigado, @SashaMIT, pela correção. |
|
Obrigado por confirmar no NFC-e de SP. 000010 fica 10, porque só os zeros da esquerda saem. |
Summary
The NFC-e QR builder removed every
0from the CSC id. SEFAZ only drops zeros that are not significant (the ones on the left). Id000100was sent as1, and the SHA-1 was taken over that wrong id, so the receipt QR does not match the token registered for that taxpayer.000001still becomes1.Test plan
tests/test_nfce_qrcode_csc.py: before this change the id came back as1. After it, the parameter is100and the hash matches SHA-1 of that parameter plus the CSC.000001still becomes1.Made with Cursor