Closed ringloop2 closed 1 year ago
Can you send me the failing payments file by e-mail? You are probably the first one really using the payment import feature. I implemented it some years ago but unfortunately it never went into production.
Identified the problem:
we need a unique ID for each payment detail, to prevent duplicate imports.
based on the camt files from postfinance the Refs/InstrId
seemed suitable for this.
Unfortunately this seems not to be so well standardized (or I don't understand it really...). Anyway the camt File that causes the error doesn't have this element in its Refs
element. But it has a Refs/TxId
element that seems to unique (hopefully) too.
I'll change the payment_reader to use the TxId
if the InstrId
isn't found.
In this paper from SIX you will find information about the standards of the XML file (camt.054).
business-rules-sps-2022-de.pdf
I don't find these documents particularly instructive... @ringloop2: where did you get the screenshot describing the references from? Didn't find this info in the attached document.
Anyway I will try to use TxId
as unique reference to decide if a payment has already been processed.
Checked with a test file from postfinance again: the camt054 format from postfinance doesn't have a TxId
element, only a InstrId
. The ABS format instead has TxId
and no InstrId
. So much for standards...
It doesn't matter what these ids really mean, as long as they are sufficiently unique. Which seems to be the case.
The camt reader now accepts any of these two id elements.
When importing the payment file in camt.054 format, I get an error message.