nemiah / phpFinTS

PHP library to communicate with FinTS/HBCI servers
MIT License
130 stars 39 forks source link

GetStatementOfAccountXML throws UnsupportedException #398

Closed DanielEgenolf closed 1 year ago

DanielEgenolf commented 1 year ago

Hello,

I am using GetStatementOfAccountXML to get all balances of my account. Unfortunately, the method createRequest throws the following exception: The bank (or the given account/user combination) does not support GetStatementOfAccountXML.

The problem is that the call $upd->isRequestSupportedForAccount($this->account, 'HKCAZ') returns false. So I passed a logger interface to FinTS instance, GetStatemetOfAccountXML and UPD and found out that createRequest gets called twice.

At the first call, I can get the data (Document xml tree): [2022-12-15T05:55:48.581091+01:00] app.INFO: Find HIUPD... [] [] [2022-12-15T05:55:48.581129+01:00] app.INFO: Check erlaubte Geschaeftsvorfaelle... [] [] [2022-12-15T05:55:48.581150+01:00] app.INFO: - Found: HKSAK [] [] [2022-12-15T05:55:48.581168+01:00] app.INFO: - Found: HKISA [] [] [2022-12-15T05:55:48.581184+01:00] app.INFO: - Found: HKSSP [] [] [2022-12-15T05:55:48.581200+01:00] app.INFO: - Found: HKCAZ [] [] [2022-12-15T05:55:48.581767+01:00] app.DEBUG: > HNHBK:1:3+000000000517+300+IS2121505554861+3'HNVSK:998:3+PIN:2+998+1+1::zy3Clej8E4UBAABQoC3EiWuowAQA+1:20221215:045548+2:2:13:@8@00000000:5:1+280:67092300:PRIVATE:V:0:0+0'HNVSD:999:1+@314@HNSHK:2:4+PIN:2+946+8543256+1+1+1::zy3Clej8E4UBAABQoC3EiWuowAQA+1+1:20221215:045548+1:999:1+6:10:19+280:67092300:PRIVATE:S:0:0'HKCAZ:3:1+IBAN:BIC:33321244::280:67092300+urn?:iso?:std?:iso?:20022?:tech?:xsd?:camt.052.001.02+N+20221128+20221215'HKTAN:4:7+4+HKCAZ'HNSHA:5:2+8543256++PRIVA''HNHBS:6:1+3' [] [] [2022-12-15T05:55:48.944120+01:00] app.DEBUG: < HNHBK:1:3+000000028386+300+IS2121505554861+3+IS2121505554861:3'HNVSK:998:3+PIN:2+998+1+2::zy3Clej8E4UBAABQoC3EiWuowAQA+1:20221215:055548+2:2:13:@8@00000000:5:1+280:67092300:PRIVATE:V:0:0+0'HNVSD:999:1+@28163@HNSHK:2:4+PIN:2+946+8543256+1+1+2::zy3Clej8E4UBAABQoC3EiWuowAQA+1+1:20221215:055548+1:999:1+6:10:19+280:67092300:PRIVATE:S:0:0'HIRMG:3:2+3060::Bitte beachten Sie die enthaltenen Warnungen/Hinweise.'HIRMS:4:2:3+0020::*Abfrage CAMT Umstze erfolgreich durchgefhrt'HIRMS:5:2:4+3076::Starke Kundenauthentifizierung nicht notwendig.'HITAN:6:7:4+4++noref+nochallenge'HICAZ:7:1:3+IBAN.......:BIC...:33321244::280:67092300+urn?:iso?:std?:iso?:20022?:tech?:xsd?:camt.052.001.02+@27649@<?xml version="1.0" encoding="ISO-8859-1" ?><Document ...

But on the second call the execption is thrown: [2022-12-15T05:55:48.947019+01:00] app.INFO: Find HIUPD... [] [] [2022-12-15T05:55:48.947065+01:00] app.INFO: Check erlaubte Geschaeftsvorfaelle... [] [] [2022-12-15T05:55:48.947086+01:00] app.INFO: - Found: HKSAK [] [] [2022-12-15T05:55:48.947104+01:00] app.INFO: - Found: HKISA [] [] [2022-12-15T05:55:48.947119+01:00] app.INFO: - Found: HKSSP [] [] [2022-12-15T05:55:48.947134+01:00] app.INFO: - Found: HKEKA [] [] [2022-12-15T05:55:48.947149+01:00] app.INFO: - Found: HKKAU [] [] [2022-12-15T05:55:48.947163+01:00] app.INFO: - Found: HKPSP [] [] [2022-12-15T05:55:48.947178+01:00] app.INFO: - Found: HKPAE [] [] [2022-12-15T05:55:48.947193+01:00] app.INFO: - Found: HKKAA [] [] [2022-12-15T05:55:48.947207+01:00] app.INFO: - Found: HKPOF [] [] [2022-12-15T05:55:48.947221+01:00] app.INFO: - Found: HKQTG [] [] [2022-12-15T05:55:48.947236+01:00] app.INFO: - Found: HKSPA [] [] [2022-12-15T05:55:48.947250+01:00] app.INFO: - Found: HKSAL [] [] [2022-12-15T05:55:48.947264+01:00] app.INFO: - Found: HKKAZ [] [] [2022-12-15T05:55:48.947278+01:00] app.INFO: - Found: GKVPU [] [] [2022-12-15T05:55:48.947292+01:00] app.INFO: - Found: GKVPD [] []

Do you have an idea whats wrong here?

Thanks and kind regards Daniel

DanielEgenolf commented 1 year ago

Sorry... this was my fault. I looped over several accounts and for one of that the exception has been thrown.