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

addressline1 & 2 clipped #81

Closed Bamboo-devops closed 2 years ago

Bamboo-devops commented 2 years ago

Hello, may I know why the addressline1 & line2 clipped when value larger than 70 characters? can we increase to 80, 90? Thanks if (addressOut.getType() == Address.Type.COMBINED_ELEMENTS) { addressOut.setAddressLine1(clippedValue(addressOut.getAddressLine1(), 70, fieldRoot, ValidationConstants.SUBFIELD_ADDRESS_LINE_1)); addressOut.setAddressLine2(clippedValue(addressOut.getAddressLine2(), 70, fieldRoot, ValidationConstants.SUBFIELD_ADDRESS_LINE_2)); }

manuelbl commented 2 years ago

The maximum length is mandated by the standard. If the address lines are longer than 70 characters, banks will not accept the payment. Most likely, the length for the QR bill standard was derived from the SIC payment specification. So even if a bank would accept it, they couldn't make a payment to another bank.

Also see, Swiss Implementation Guidelines for the QR-bill, chapter 4.2.2

Bamboo-devops commented 2 years ago

Thank you, I see