manuelbl / SwissQRBill

Java library for Swiss QR bill payment slips (aka QR-Rechnung)
https://www.codecrete.net/qrbill
MIT License
156 stars 37 forks source link

Die Zahl '@qrversion' muss gößer oder gleich 0 sein. [Zeile 0002] #56

Closed elvisbegovic closed 2 years ago

elvisbegovic commented 2 years ago

Actually validating a QR-code outputed from this lib v.3.0.2 I got : image

Someone know how they determines qrversion value and why it is "-1" instead "0" by default and sometimes 10?

Thanks

manuelbl commented 2 years ago

This looks like a nonsense error message that brings internal details of the validation software to the surface.

It looks like "@qrversion" refers to the QR code version. It is basically the size of the QR code (see https://www.qrcode.com/en/about/version.html). Version -1 does not exist. It would basically be a QR code with negative size.

Most likely, it indicates that the QR code could not be scanned.

I have successfully validated many bills at https://validation.iso-payments.ch. So it's unlikely to be a general problem. Can you provide the specific QR bill that you tried to validate?

elvisbegovic commented 2 years ago

@manuelbl what reactivity ! :) Here you are :

2

(i successfully validate many qrcode, but some are not valid, like this one)

manuelbl commented 2 years ago

If I download the PNG and validate it, I get the same error message even though the validation software was obviously able to decode the data in the QR code.

If I then scale the image up to 200% and upload it again, it successfully validates.

I guess the error message is non-sense. Either ignore it or open a request on the validation web site.

elvisbegovic commented 2 years ago

I agree with this.

(especially since they refuse if we upload pdf, and invalidate image)

manuelbl commented 2 years ago

Or upload higher resolution images...