raphaelm / python-sepaxml

SEPA Direct Debit XML generation in python
MIT License
112 stars 43 forks source link

Support more SEPA versions? #20

Closed henryk closed 1 year ago

henryk commented 5 years ago

What is the primary obstacle to increasing the set of supported SEPA PAIN versions? For example https://github.com/raphaelm/python-fints/blob/18e361ab2c5beeddf126a601bfcc7753cf84efec/fints/client.py#L732 may choose pain.001.003.03 which I guess worked before schema validation was introduced, but fails now, because that schema is not in schemas/. Is it enough to drop the XSD file there, or are there more required steps?

raphaelm commented 5 years ago

It should be enough to drop the XSD file, as long as the new version does not add any required fields or removes any fields. In this case, we'd need code changes to adjust the content. However, a simple test case should make that clear.

tloebhard commented 3 years ago

comdirect needs pain.001.003.03, and yes, I fixed it by adding https://github.com/hbci4j/hbci4java/blob/master/src/main/resources/pain.001.003.03.xsd in https://github.com/raphaelm/python-sepaxml/tree/master/sepaxml/schemas to make SEPA transfer work.

Can you just add it to the package or are there some legal issues?

Thank you!

raphaelm commented 3 years ago

I think it's fine, feel free to create a PR

tloebhard commented 3 years ago

Ok, I checked that a bit more in detail, the only difference between pain.001.001.03.xsd and pain.001.003.03.xsd is the naming of complexType ServiceLevel (and the occurences). I the old version pain.001.003.03 it is called ServiceLevelSEPA.

As I cannot find it in https://www.iso20022.org/catalogue-messages/iso-20022-messages-archive?search=pain.001.003.03 , your pain.001.001.03.xsd is in big parts different to pain.001.001.03.xsd from hbci4java and pain.001.003.03 seems to be just an old standard - I just copy your pain.001.001.03.xsd to pain.001.003.03.xsd und set the namespace. For comdirect that works, too.

1oglop1 commented 3 years ago

@raphaelm If I understand it correctly the library is missing the latest pain that can be downloaded at https://www.iso20022.org/iso-20022-message-definitions?search=pain because BIC is no longer required since 2016. ref: https://en.wikipedia.org/wiki/ISO_9362

raphaelm commented 3 years ago

I've added a pain.001.003.03 I found online to the repo now, but I continue to be confused since that version does not exist at the link supplied by @1oglop1

tloebhard commented 3 years ago

I continue to be confused since that version does not exist at the link supplied by @1oglop1

As written above - I think it is deprecated (and just still used by some banks)... Maybe that's why they don't list it anymore. But still confusing, that 001.001.03 is the current version and 001.003.03 is the old version.

1oglop1 commented 3 years ago

@raphaelm There is a possibility that I was referencing pain.001.001.XX - it took me a couple of days to understand the versioning scheme. Of the whole message set and realize that each message is versioned separately from the message set. I wish there was a simple description of their versioning scheme. Here is my understanding pain.AAA.BBB.CC. A - message type, B message sub-type, C - version. But I could be worng.

raphaelm commented 1 year ago

This is all very confusing. I've cleaned up versions recently and now added a PR to add the newest ones #59