xseman / bysquare

Encode & Decode "PAY by square" QR string.
https://xseman.github.io/bysquare/
Apache License 2.0
26 stars 4 forks source link

Some QR codes do not work #5

Closed Matej4386 closed 1 year ago

Matej4386 commented 1 year ago

Hello, first thank you very much for this work. It helps me a lot.

During testing we have found out that some QR codes do not work and we can't find why. We are testing with several mobile bank apps (broken QR codes do not work for none)

We are using version 1.0.7 with qrcode 1.5.0.

For example (working solution): "Amount": "28", "BankAccounts": "1", "CurrencyCode": "EUR", "IBAN": "SK12345600000000000123456", "PaymentNote": "Name A", "PaymentOptions": "1", "Payments": "1", "SpecificSymbol": "4129", "VariableSymbol": "2268824129"

Not working: "Amount": "74", "BankAccounts": "1", "CurrencyCode": "EUR", "IBAN": "SK12345600000000000123456", "PaymentNote": "Name B", "PaymentOptions": "1", "Payments": "1", "SpecificSymbol": "4129", "VariableSymbol": "2268824129"

I am open to testing just let me know. Due to privacy reason I am not sharing whole information.

xseman commented 1 year ago

Thanks @Matej4386 for reporting this issue.

Can you try scanning the QR using the Tatra Banka app? I have not been able to reproduce the problem using your model example.

Matej4386 commented 1 year ago

Hi @xseman, thank you for quick response. Model is not the exact one (I cant post the not working model here) - I can sent it to you.

xseman commented 1 year ago

So after testing we found that the non-ASCII characters are invalid for PaymentNote, not sure if any banking app will automatically convert them to basic ASCII, but I wouldn't count on it.

The solution could be for the generate() function to remove the diacritics from PaymentNote as side-effect.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

Matej4386 commented 1 year ago

Resolved. Thank you very much

xseman commented 1 year ago

v1.3.2 will convert latin-1 to basic letters. f9932a5bafed18bda9c5abb53730d823f1824d9c