DannielWhatever / emvqr

help to work with emv qr code specification for digital payments
10 stars 11 forks source link

Decoding QR Code with certain CRC code failing #13

Open mamalisyes opened 9 months ago

mamalisyes commented 9 months ago

Hi,

In case of QR string with CRC code starting with '0' or '00' or '000', for example sample_qr_string = "00020201021126580014A000000615000101065887340212MBBQR1666987031000000000005204581253034585802MY5908TAKOYAKI6006PAHANG630400D7"

when I'm using

emvqr.decode(sample_qr_string),

its failing at validateChecksum because variable expectedCRC return 'D7' while variable checksum return '00D7'.

Is there any way to configure on this issue?