Comments (10)
As far as I read the documentation from the link you provided the checksum digits are still calculated conforming to the IBAN specification. My assumption is that the BBAN specific checksum is computed in a way, so that the IBAN check digits are always 56. Is that correct?
Nevertheless I'm not sure from your issue description if there is actually a problem with the implementation. If so could you please elaborate what your problem actually is?
from schwifty.
Ping @Prome88
from schwifty.
Hi,
as im quite new to github, I've mistakenly open an issue instead of an forum thread.
Yes you are correct, maybe it would be clearer with the example from wikipedia:
SIkk bbss sccc cccc cxx
k = IBAN check digits (always = "56")
b = National bank code
s = Branch code
c = Account number
x = National check digits
Few countries do not utilize the IBAN in full and have some fixed numbers / characters, usually as IBAN check digits.
The question is if IBAN.generate() supports / will support this deviation(s)/addendum(s) from IBAN standard?
from schwifty.
Also I cannot get BIC from a valid SI IBAN.
Is this project dead?
from schwifty.
Getting BICs from the bank code of an IBAN is not done via some algorithm. It is a fixed list, where you have to lookup the bank code (that is part of the IBAN). We implemented that for Germany, since there is an official source that is more or less machine readable. You can have a look how that is done in this repository here.
If there is such a list to get a mapping bank code to BIC for all slowenian banks, let us know or create a pull requests.
We looked into this a while back, but there where no good sources for this kind of information.
from schwifty.
Also, back to topic on @Prome88 issue - let me try to understand your problem:
Slowenian IBANs consist of SIkk bbss sccc cccc cxx
where xx
is a checksum for the BBAN part of the IBAN (meaning bbss sccc cccc c
, so that the kk
IBAN checksum is always 56.
And you want to generate a IBAN by just having National bank code (b
), branch code (s
) and the account number (c
), but not the internal checksum (x
).
Is that correct?
Is there a source on the algorithm, that is behind that checksum?
from schwifty.
Central bank of Slovenia has this list available from:
https://www.bsi.si/placila-in-infrastruktura/placilne-storitve-in-elektronski-denar/identifikacijske-oznake-in-kode-bic
And the offical explanation on the algorithm:
https://www.bsi.si/placila-in-infrastruktura/placilne-storitve-in-elektronski-denar/placilni-in-transakcijski-racun
from schwifty.
The list of BICs is appreciated, thanks! It is not as machine readable as it could be (.csv, .json or .xml), but at least - a list!
Regarding generation of the BBAN checksums, I did not find any algorithm on the website you linked, also not on linked webpages (in slowenian) like this one , but the php lib for handling IBANs has the same issue here (open for over 2 years). It contains some resources - and as far as I could see also the wanted algorithm for Slowenia.
I draw two conclusions here:
- it is a lot of work
- we should base the work here on their collected list
- help is welcome!
@Prome88 Did i understand your problem correctly (two comments up)?
from schwifty.
Hi, let me post a follow-up on this matter. The algorithm is specified (albeit in Slovene language), if you follow some of the links above to an official law amendment. To spare you the inconvenience, let me briefly sketch the algorithm:
First of all you should know that each slovene BBAN is suffixed with two control digits so that modulo 97 you will always get 1. So BBAN % 97 = 1 always.
IBAN validation:
- Take BBAN and concatenate to get the following string: BBAN<S><I>00 (here <S> = "28" and <I> = "18").
- Divide the resulting number by modulo 97. As BBAN % 97 = 1, then BBAN<S><I>00 % 97 is always constant, namely 42.
- Replace 00 at the end with control digits 56 and you will always get BBAN<S><I>56 % 97 = 1.
Hence, in order to get a valid IBAN, you should always use 56 as control digits in the "SEPA header" (right after the country code) for every slovene IBAN.
Of course, in order to facilitate a full-fledged BBAN validation, a special functional block should be added to Schwifty to manipulate IBANs by their corresponding BBAN validation algorithm, which is frankly speaking a lot of work. However, as a slightly better approximation of a full Slovene IBAN validation, a simple modification of SEPA specification »SI2!n5!n8!n2!n« can be made by using the right control digits 56 instead of 2!n.
So, put at least »SI565!n8!n2!n« and you'll be slightly better off with Slovene IBAN validation. In fact, I have created a pull request #12 with this modification and some other improvements of the Schwifty internal IBAN spec JSON DB. Please review ...
from schwifty.
Fixed by #12
from schwifty.
Related Issues (20)
- Hi HOT 1
- We have multiple BIC definitions for the same bank code which makes Schwifty selecting the wrong one for the IBAN. HOT 2
- 'importlib.abc.Traversable' is deprecated and slated for removal in Python 3.14 HOT 5
- AttributeError: 'str' object has no attribute '_validate_characters' HOT 1
- Improve BIC retrival from IBAN when having multiple Branch candidates
- Swiss bank codes and BICs HOT 1
- Error with 2023.11.1 HOT 3
- Validating IBANs in African countries result in 'Unknown country-code' error HOT 4
- Create a command to extract the French bank registry HOT 4
- Generate NL IBAN may generate invalid IBAN HOT 2
- Add bank registry for Montenegro HOT 2
- When trying to compile code with pyinstaller a frozen importlib error is raised HOT 9
- Commerzbank's usage of differenz BICs HOT 5
- IBAN.generate not working for DK ? HOT 5
- Possible Error when validating Norwegian national bank accounts ending in zero. HOT 10
- Failed to load registry bank HOT 6
- Are the iso3166 and pycountry dependencies doing the same thing? HOT 3
- Missing BICs for Portuguese banks HOT 4
- Missing requirement of typing-extensions on python <= 3.10 HOT 2
- Using random with specific country codes repeatedly fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schwifty.