python-sepaxml
python-sepaxml copied to clipboard
Sparkasse compatibility
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.
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?
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:
- Replace PmtInfId data with "NOTPROVIDED"
- Remove PmtTpInf tag
- Remove CdtrAgt tag
- Remove BtchBookg tag
Can you tell me which PAIN version you used and whether you tried with debits or transfers?
pain.001.001.03
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