juntagrico / juntagrico-billing

GNU Lesser General Public License v3.0
2 stars 3 forks source link

Error message: Payment file could not be read element Refs/Instlrd not found. #27

Closed ringloop2 closed 1 year ago

ringloop2 commented 1 year ago

When importing the payment file in camt.054 format, I get an error message.

samuel-iseli commented 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.

samuel-iseli commented 1 year ago

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.

ringloop2 commented 1 year ago

In this paper from SIX you will find information about the standards of the XML file (camt.054). image business-rules-sps-2022-de.pdf

samuel-iseli commented 1 year ago

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.

samuel-iseli commented 1 year ago

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.