arturmkrtchyan / iban4j

A Java library for generation and validation of the International Bank Account Numbers (IBAN ISO_13616) and Business Identifier Codes (BIC ISO_9362).
http://iban4j.org
Apache License 2.0
271 stars 124 forks source link

HU build fails #64

Closed zaszlo closed 3 years ago

zaszlo commented 4 years ago

BBAN, example for the internally used format: "11773016-11111018-00000000"

By debugging I see that the following builders are considered at HU: String bankCode = "117"; String branchCode = "7301"; String nationalCheckDigit = "6"; String accountNumber = "1111101800000000"; Iban iban = new Iban.Builder() .countryCode(CountryCode.HU) .bankCode(bankCode) .branchCode(branchCode) .nationalCheckDigit(nationalCheckDigit) .accountNumber(accountNumber) .build(); Now this returns the iban number: HU58117730111111018000000006 But correct generators, also online generators from "11773016-11111018-00000000" will build HU??117730161111101800000000 So in iban4j the 8th BBAN character, the nationalCheckDigit gets appended to the end, that's why still the IBAN length is right. The nationalCheckDigit is not to be positioned as the last digit. It is the 8th digit in the BBAN format.

bvaardal commented 4 years ago

Screen Shot 2020-06-27 at 9 40 31 PM