Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment splitting incorrect #113

Open
roben opened this issue Jul 17, 2018 · 2 comments
Open

Segment splitting incorrect #113

roben opened this issue Jul 17, 2018 · 2 comments

Comments

@roben
Copy link

roben commented Jul 17, 2018

According to https://www.hbci-zka.de/dokumente/spezifikation_deutsch/fintsv3/FinTS_3.0_Formals_2017-10-06_final_version.pdf (G. Data Dictionary -> Segmentkennung), the splitting in the constructor of Response.php needs to be something like this:

$this->segments = preg_split("/'+(?=[A-Z0-9]{1,6}:\d{1,3}:\d{1,3}(:\d{1,3})?)/", $rawResponse);

@roben
Copy link
Author

roben commented Jul 17, 2018

The old regexp splitted on two subsequent single quotes in transaction texts (''), which is definitely wrong.
Even better would be to filter out binary content (@<length>@), see documentation, which could still contain segment headers (i.e. 'A:1:2) and break stuff.

@timrasche
Copy link

Ty @roben ! Safed my day!

The owner of this lib is still offline? No answer after buy pro version! Frustrated...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants