python-sepaxml icon indicating copy to clipboard operation
python-sepaxml copied to clipboard

Sparkasse compatibility

Open saddy001 opened this issue 3 years ago • 3 comments

I had to do the following modifications to make it compatible with Sparkasse:

xml = re.sub(r'<PmtInfId>.+</PmtInfId>', '<PmtInfId>NOTPROVIDED</PmtInfId>', xml)
xml = re.sub(r'.+<PmtTpInf>[\S\n ]+?</PmtTpInf>\n', '', xml)
xml = re.sub(r'.+<CdtrAgt>[\S\n ]+?</CdtrAgt>\n', '', xml)
xml = re.sub(r'.+<BtchBookg>[\S\n ]+?</BtchBookg>\n', '', xml)

Maybe these could be options for python-sepaxml.

saddy001 avatar Nov 22 '20 10:11 saddy001

Sorry for the late reply.

We're not going to add some arbitrary regexes, but if there's a way we can fix this structurally, we are happy to. Can you tell me which PAIN version you used and whether you tried with debits or transfers?

raphaelm avatar Jan 08 '21 21:01 raphaelm

We're not going to add some arbitrary regexes

Sure, that was also my request.

but if there's a way we can fix this structurally

Here are the changes from above:

  1. Replace PmtInfId data with "NOTPROVIDED"
  2. Remove PmtTpInf tag
  3. Remove CdtrAgt tag
  4. Remove BtchBookg tag

Can you tell me which PAIN version you used and whether you tried with debits or transfers?

pain.001.001.03

saddy001 avatar Jan 09 '21 09:01 saddy001

I had to do the following modifications to make it compatible with Sparkasse:

xml = re.sub(r'<PmtInfId>.+</PmtInfId>', '<PmtInfId>NOTPROVIDED</PmtInfId>', xml)
xml = re.sub(r'.+<PmtTpInf>[\S\n ]+?</PmtTpInf>\n', '', xml)
xml = re.sub(r'.+<CdtrAgt>[\S\n ]+?</CdtrAgt>\n', '', xml)
xml = re.sub(r'.+<BtchBookg>[\S\n ]+?</BtchBookg>\n', '', xml)

Maybe these could be options for python-sepaxml.

The regex [\S\n ] looks broken. \S means non-space. I guess you mean \s

guettli avatar Apr 03 '21 08:04 guettli