mschindler83/fints-hbci-php

$soa->getStatements() - Fatal error

thielecke opened this issue · 3 comments

While working with the samples I got in the statements_of_accounts.php this error:

Fatal error: Call to a member function getStatements() on null in C:\xampp\htdocs\test\vendor\mschindler83\fints-hbci-php\Samples\statement_of_account.php on line 40

40: foreach ($soa->getStatements() as $statement) {

Hi @thielecke,
Thanks for reporting this issue.
Maybe it is possibe for you to give a more detailed issue description.

This error you mentioned can have millions of reasons ;)

KSas commented

@mschindler83

Habe das gleiche Problem, es scheint bei der Volksbank ein anderes Dateiformat zu geben.

Nachfolgend Sparkasse, wo Umsätze angezeigt werden können:
:61:1610041004CR0,01N062NONREF :86:166?00GUTSCHRIFT?109251?20EREF+YYR453PPWT45SJN2 PP.54?2167.PP PAYPAL?22SVWZ+PP.5467.PP YYR453PPWT4?235SJN2?30DEUTDEFFXXX?31DE8 8500700100XXXXXX303?32PayPal Europe S.a.r.l. et C?33ie S.C.A

und Volksbank, wo dies nicht klappt:

00OnlBanking-Euro-Überweisung?10993000?20SVWZ+BIC:GENODEM1MSC@@?21IBAN:DE884016005027XXXXXXXX?22Datum: 03.10.16 Zeit: 11:13?23 K@@D 0001006412 TAN XXXXX?24UltraGrip?25 9 195/6?@@265 R15 91T M+S Winterreifen?27bei ?28 A.T.U.?30GENODEM1M@@SC?31DE884016005027XXXXXXXX?32D

Scheint, wie wenn er beim parsen vom response wegen den @ anstatt dem : Probleme hat ...

I can confirm that with VOLKSBANK the package is not working; the parser fails. However, after the following changes in \lib\Fhp\Parser\MT940.php it works:

line 57
OLD: $days = explode("\r\n-", $this->rawData);
NEW: $days = explode("@@-", $this->rawData);

line 59
OLD: $day = explode("\r\n:", $day);
NEW: $day = explode("@@:", $day);

I apologize that I don't know how to bring above into a pull-request as I am new to GitHub. Also, it has of course to be distinguished between when to use the \r\n-delimiters and when the @@-ones.