Open tskogberg opened 9 years ago
Hi,
thanks for using the gem :)
I'm not sure if i understand you correctly. As far as i understand the concept of a bank code (BLZ in german, see https://en.wikipedia.org/wiki/Bankleitzahl) it is a unique identifier for a bank in Germany. The BIC is an ID for a bank and some other kind of businesses that is globally unique. With the introduction of the Single European Payment Area (SEPA, see https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) every german bank had to get a BIC that identifies them globally. In addition to this every account number for every bank account was converted into an international bank account number (IBAN see https://en.wikipedia.org/wiki/International_Bank_Account_Number).
I can tell you from my payments in the past that the combination of bank code (BLZ) and account number (Kontonummer in german) always identified an account at a specific bank in Germany regardless of an bank office. Today the IBAN in Germany is calculated using the country code DE, a number that ensures the integrity of the IBAN, the bank code and the account number. So the IBAN is identifying when transferring money from one german account to another. If one of the accounts is not from Germany the BIC is also needed. I'm not sure if the IBAN enough information if the not german account is within the SEPA. But globally the BIC and IBAN do identify any account.
To your question. Any business/bank with a BIC should be able to identify any account with the information of an IBAN whose BIC is assigned to the given business.
I do agree with you that we should probably change the gem in the future to use the BIC as main identifier for banks, but that needs some research if every use case will work after the change.
If this comment didn't answer your question please help me to understand your point of view.
Thank you for a quick answer!
Yes, I think you're right that the main bank is probably the only thing that is needed. That the BIC points to a local branch of the main bank might be less important.
The reason I made the issue is that we see a difference in the BIC lookup when we compare it to other services. (https://www.sparkasse-koelnbonn.de/privatkunden/banking/auslandszahlungen/iban/ for an example).
I suspect the either do a correct lookup or they just pick the first office/branch instead of the last as in your gem.
Could you provide an example BLZ and IBAN where there are differences in the results? I'd like to see if i can get further clarification.
Hi, thank you for a good gem.
I have a question about the BIC lookup:
As the gem works today it does the BIC lookup dependent on the blz (bank code). Since a blz can point to different branches/offices of a bank it might not pick the correct one. The hash of blz -> BIC will only store the last blz with the same number. Will this work? Will the bank fix that issue internally when you do a payment?