Closed nonbinary closed 7 years ago
This shouldn't be complicated. MandateResponseListener needs some restructuring. These responses need to create Donors, and the listener now assumes a donor is present. So I'll move fetching and validating into a private function, add another one for donor creation, and call them from the switch statement.
With that setup, file import will be automatic, but the user should edit the donor by hand afterwards.
There apparently are two kinds of online mandates. One is if a donor gives a mandate through their online bank. This gets added to autogiro's registry, and needs to be approved by the user before it can be used. This procedure should be possible through sending files, or through autogiro's online website, or through exchanging files.
The other form is using autogiro's online forms. This produces a file that is sent to the user, in xml or pdf format. These mandates, as far as I can understand, should then be added just like a paper mandate. The xml/pdf file contains a verification code, that appears to be the BankID signature. These files should be kept safe by the user, just like a paper mandate.
The online form version should be possible to add quite easily - it looks like it just needs a new mandate source. Apart from that it seems to work exactly like a paper mandate. The other version needs support for the RESPONSE_FROM_BANK files, and might need a bit more work. Personally, I'm more interested in the online form version. A frontend application could parse the xml file, and then add it just like a paper mandate.
Cool. So let's break this down to two separate issues. And let's make the xml/PDF thing into alpha-2.
Let's also save the signature verification code in the db.
Who chooses PDF or xml? Parsing xml is easy so we should definitely add that too.
Giroapp import newMandate.xml
should just work...
Xml or pdf is chosen at download, so that's up to the user. I say we only accept xml.
The user being the org receiving transactions, or the payer?
User as in the receiving organization.
Perfect. Is there a spec on the xml format available?
Haven't found specs, or proper instructions, yet. I'll have to test this a bit more to figure out the proper procedures. I do have a form that we received, I'm attaching it here (emptied of data) In the xml file, empty posts contained a line break, but were present, so it's not hard to figure out how they should look. The form itself can contain custom fields, added by the payer recipient, and these are included in the xml file. This might complicate things a bit.
The file contains personal numbers in two different formats: recipient organization number with a dash, and the donor's personal number, without a dash. I'm thinking the donor's ID number is printed as the donor typed it.
The signature is present as
Closed as this is split into two different issues...
Add functionality to import files containing MANDATE_ACCOUNT_RESPONSE_FROM_BANK, ie digital mandates.