AbcAeffchen / Sephpa

PHP class to create SEPA xml files for credit transfer and direct debit
GNU Lesser General Public License v3.0
71 stars 31 forks source link

No doc available #4

Closed shawe closed 3 years ago

shawe commented 8 years ago

I'm trying to add support for SEPA on FacturaScripts, but with no doc from sephpa is not easy to understand what is every value and option and why I needed.

Fatal error: Uncaught exception 'AbcAeffchen\Sephpa\SephpaInputException' with message 'The values of iban, ci are invalid.

In this case, I know that IBAN is really invalid, I'm using some default values, but I don't know what is CI (Creditor-Identifier), I never use it before SEPA on Spain.

Also, I'm supossing that I need to use SephpaDirectDebit::SEPA_PAIN_008_003_02, but I really don't know what difference exists between the 4 types. I'm assuming that I need to use SEPA Core Direct Debit.

Can you add some little explanation please?

AbcAeffchen commented 8 years ago

The problem with this is, that this errors are about wrong input or wrong combinations of inputs.

In fact I also don't know when you have to use what. You really should ask your bank if you want to know which data to input for what type of transaction. You also have to ask your bank what SEPA file format version the support.

I only implemented the SEPA file format from the official specifications.

So the only thing I can do, is to add the limitations of the different inputs like length and valid characters. The list of available inputs is already in the README.md.

shawe commented 8 years ago

Yes, I see that is a wrong input, but without information to know what I need to put on it, is not easy for a correct input.

Looking for some information on spanish bank, I found that "Banco Sabadell" have this info https://www.bancsabadell.com/cs/Satellite/SabAtl/Adeudos-Directos-SEPA/6000005005160/es/ at this moment, the most detailled information that I found.

In it's PDFs explaining about SEPA N19-14 and SEPA N19-44, that N19-14 is CORE pain.008.001.02 and N19-44 is B2B pain.008.001.02 also.

Can you explainme how to add support for this other XML files?

shawe commented 8 years ago

This online validation can be useful on Readme.md http://be.sepaformatvalidation.com/index.php

AbcAeffchen commented 8 years ago

As I said before, I can only provide valid character sets and input size limitations from the SEPA documentation. But this limitations must not apply to your bank. E.g. in Germany most banks seem to accept characters like "ä" or "ß", witch are not official supported. But I cannot tell you what content you have to put in a creditor information (CI) field. I just don't know this. Ask your bank about this. I also had a hard time to find information online. Most people I know just make an appointment at their bank and ask them. But maybe this will cost something. The other side is, that I don't want to tell the people what content they should use as input. I'm no bank adviser.

I will add the technical limitations. I think there is also a setting to turn the validation off, so you get the errors not from me, but from your bank after trying to upload the file, so they can tell you what is wrong.

EDIT: pain.008.001.02 is the first version of the direct debit format and it is a little older. So it is not supported by Sephpa yet. Maybe I will add this some day, but at the moment I'm really busy.

shawe commented 8 years ago

I'm trying to add pain.008.001.02 to sephpa by myself (maybe only partial), I don't know if it is old or not, but seems to be the one that I need to use.

The limitations with characters also happen on Spain, like Á À or Ñ that must be replaced with A or N.

Creditor Information on this pain, seems to not be required in Spain, but I found a PDF with 34 pages that explain how to implement it with support for EU.

Banks from Spain seems to be idiot, people don't know and don't worry who ask for a correct reply. I'm asking 3 differents banks, with the same reply: "I don't know where to find this information, and I don't know who I can ask."

I can try to implement this specific pain, if you can try to correct my changes and add it to your sources can be better for all interested people, because your work on SEPA for PHP seems to be the great at this time ;)

At this moment I'm trying the next, before SEPA we use "Norma 19", and some banks are providing a little conversor tool to SEPA. Trying to add the same key-values because a file converted seems to works great.

AbcAeffchen commented 8 years ago

I think not much have been changed between pain.008.001.02 and pain.008.002.02. On a quick look, I cannot see a difference except for the version number... EDIT: At a second look it seems to be a little more...

The file format does not depend on the country, so I can use the files I have (written in german).

If you have problems sanitizing text from special characters you can use SepaUtilities.

AbcAeffchen commented 3 years ago

Meanwhile pain.008.001.02 is supported by Sephpa 2.0 which will be released shortly. There is also a wiki page for some documentation on how to use Sephpa, but still no advice on banking side.