sandermarechal / jejik-mt940

An MT940 bank statement parser for PHP
MIT License
82 stars 33 forks source link

PostFinance MT940 parser #9

Closed stefanneubig closed 6 years ago

stefanneubig commented 10 years ago

Is there already a parser around for the swiss bank PostFinance? I could provide a sample file.

sandermarechal commented 10 years ago

Not yet. I'd be happy to implement it for you though. As I explained in the readme, it's easier to work from an unredacted sample file. If you are willing to share an unredacted file with me, e-mail it to me directly at s.marechal@jejik.com. I will redact it before adding it to the test suite.

If you want to redact it yourself before sending it to me, pay attention to the detials. Replace account numbers and names with strings of the same length and character set. Also make sure you save the file correctly using the same character set and line endings, keep any trailing whitespace, don't change tabs to spaces, etcetera. The kind of things that programmers usually automate in their editors but which can ruin the formatting of an MT940 file.

stefanneubig commented 10 years ago

Great! Emailed you an unredacted sample file.

sandermarechal commented 10 years ago

That wasn't too hard. Only very little changes from the default parser. Please take a look at the master branch and test it for me. Especially the contra account number parsing. I couln't find any documentation about the file format from PostFinance but I think I was able to guess where the contra account number is stored for the most common transactions.