digitick / php-sepa-xml

* THIS PROJECT IS NO LONGER MAINTAINED* SEPA file generator in PHP
107 stars 63 forks source link

Trailing Z in CreDtTm tag #46

Open rbscholtus opened 10 years ago

rbscholtus commented 10 years ago

The generated file contains a trailing 'Z' in the CreDtTm tag: CreDtTm 2014-05-06T16:40:04Z /CreDtTm

This doesn't validate, at least not by the Rabobank under scheme PAIN.008.001.02.

Is the 'Z' PAIN.008.002 specific? So..... the whole lib is .002 specific, even when I specify PAIN.008.001.02 when I do createDirectDebit(...)?

If no timezone is specified, could you just leave the 'Z' out?

rbscholtus commented 10 years ago

I see thinking that 'Z' is 008.002 specific was foolish. Rather, 'Z' refers to the Zero timezone, ie it's equivalent to +00:00.

IMCO -- a better default format for the lib would be to add the timezone of the server, using PHP's 'P' option. So, I propose: format('Y-m-d\TH:i:sP')

This results in strings such as: CreDtTm 2014-05-09T03:52:05+08:00 /CreDtTm .. and seems to be compliant with ISODateTime (see eg http://en.wikipedia.org/wiki/ISO_8601)

BorislavSabev commented 10 years ago

@rbscholtus I just want to add that I've been using the lib with French banks and it is still a mess. And I was easily able to switch from 008.002.02 back to 088.001.02 with no modifications.

However the goal of SEPA - to "unify all banks' standards" is still NOT FULLY ACHIEVED... Every other bank will implement parts of the transfer check chain. Yes, the file formats are more or less the same but as you see different banks (in different countries) has different implementations and thus different outcomes.

Thus your files may perfectly validate with one bank and fail with the next. You may also experience different transfer validation issues with different banks. The main problem is that some banks implement the older standards and some the newer - from 008.002.01 to ..04 ...

Just FYI - I am telling you because I already had to endure a lot of pain. (: Are you doing Rabobank only or also other banks in the Netherlands? Can you say something about SEPA & Dutch banks?