Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid national checksum error for generated german BBANs #219

Open
tim-haselhoff opened this issue Aug 19, 2024 · 1 comment
Open

Invalid national checksum error for generated german BBANs #219

tim-haselhoff opened this issue Aug 19, 2024 · 1 comment

Comments

@tim-haselhoff
Copy link

tim-haselhoff commented Aug 19, 2024

Hello,

I found that when randomly generating German IBANs a lot of times an InvalidBBANChecksum Error gets thrown because of an invalid national checksum.

import schwifty


rand = schwifty.IBAN.random(country_code="DE")
print(rand.formatted)
result = rand.validate(validate_bban=True)
print(result)

This is a code snippet I have been using to generate and validate the IBAN values.

It works with IBANs when the county_code is set to GB and IT and I believe that it is due to it not finding the right checksum algorithm because validation with pre-made IBANs does work.

@mdomke
Copy link
Owner

mdomke commented Aug 30, 2024

Yes. It's a bit tricky for German BBANs because there are so many bank specific algorithms. I will try to find a solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants