chriswest101 / paynow

Easily generate a SG PayNow compliant QR code
Apache License 2.0
6 stars 6 forks source link

Resolved broken QR code issue. #3

Closed hariidavinci closed 5 months ago

hariidavinci commented 8 months ago

During stress testing, it was observed that some QR codes were failing to read. It was found that the CRC16::calculate() function returned only three characters instead of four. To address this issue, the padLeft function was utilized which resulted in successfully resolving the broken QR Code issue.

To Replicate: To fire atleast a 100+ QR within a minute and to try scanning the QR codes. The ones that fail to scan, when you recalculate the CRC16 (https://crccalc.com/), it will be a different value compared to the one returned by the CRC16::calculate function.

Thanks. Hope this helps.