How to check an IBAN number using the Apache IBANCheckDigit?
In my Android app, I'm trying to check if an IBAN bank account number is valid. This supposedly can be done using the Apache IBANCheckDigit. I now try do so as follows:
IBANCheckDigit a = new IBANCheckDigit();
try {
String checkDigit = a.calculate("MY_IBAN_NUMBER_HERE");
Boolean b = a.isValid(checkDigit);
Log.e("isValid: ", b.toString());
} catch (CheckDigitException e) {
Log.e(this, "THIS IS AN ERROR");
}
This however, always prints false. Even if I insert my own (correct) IBAN-number, it also gives a false.
Does anybody know how to use this Apache IBANCheckDigit? Any tips are welcome!