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

Broken FinInstnId #61

Open
FrankKipf opened this issue Feb 6, 2024 · 10 comments
Open

Broken FinInstnId #61

FrankKipf opened this issue Feb 6, 2024 · 10 comments

Comments

@FrankKipf
Copy link

Adding a payment without BIC leads to a broken <FinInstnId>

It should look like this:

<DrctDbtTxInf> ... <DbtrAgt> <FinInstnId> <Othr> <Id>NOTPROVIDED</Id> </Othr> </FinInstnId> </DbtrAgt> ... </DrctDbtTxInf>

But instead I receive that output:

<DrctDbtTxInf> ... <DbtrAgt> <FinInstnId/> </DbtrAgt> ... </DrctDbtTxInf>

I'm not sure, but I think in debit.py line 268 and line 269 have to be swapped with each other.

@Varchibald
Copy link

Varchibald commented May 2, 2024

I have the same issue using pain.008.001.02.

I actually fixed it by removing the condition on line 345 in debit.py: elif self.schema != 'pain.008.001.02' and self.schema != 'pain.008.002.02'

Not sure why that was there in the first place..

@FrankKipf
Copy link
Author

I added a BIC to each payment. If you don't have the BIC, take a look at openiban.com

@Varchibald
Copy link

Varchibald commented May 2, 2024

I need BICs from a broader range of countries than what is supported by openiban, unfortunately. I edited my solution in previous answer, maybe I'll open a PR later.

@Varchibald
Copy link

@raphaelm do you know why this condition was put in there?

@raphaelm
Copy link
Owner

raphaelm commented May 2, 2024

No, not reall

@Varchibald
Copy link

I assume the original merge @ #25 wanted the BIC-notprovided interaction only for their format (pain.008.003.02), so they excluded the other formats for fault of testing. Imo it shouldn't cause any issues if the exception is removed.

@dominiks96
Copy link
Contributor

dominiks96 commented Sep 17, 2024

This condition is simply wrong still. Also for pain.008.001.02, according to the German Bundesbank, see docs https://www.bundesbank.de/resource/blob/877540/eec34592d2bf123596897cf29448e04b/mL/technische-spezifikationen-sepa-lastschriften-2023-11-data.pdf

Bei nationalen und grenzüberschreitenden SEPA-Lastschriften (CORE/B2B) ist die
Angabe des BIC des Zahlungsdienstleisters des Zahlers grundsätzlich entbehrlich; sofern auf die Angabe des BIC verzichtet wird, ist das Element
mit der Konstante NOTPROVIDED zu belegen.

(Translated by DeepL)

For national and cross-border SEPA direct debits (CORE/B2B), it is generally not necessary to specify the BIC of the payer's payment service provider; if the BIC is not specified, the element must be assigned the constant NOTPROVIDED.

IMO, the elif here and here should simply be replaced by an else.

@raphaelm mind having a look? Debits are failing due to this. Commerzbank rejects them due to xml pain validation.

@raphaelm
Copy link
Owner

I currently do not have the time to look at this until it is a case that affects us, but I'm happy to accept PRs that fix it.

@dominiks96
Copy link
Contributor

@raphaelm I'll give it a shot and create a PR.

Would be cool, if you could assemble a release including the fix soon. Otherwise, using it is kind of a lot of effort for most of the users probably.

@dominiks96
Copy link
Contributor

@raphaelm PR is here. I tested it in the commerzbank online portal and also using the windata app

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

4 participants