Closed stevstrong closed 2 years ago
Side note: You can get rid of that autoload error by creating a project (rather than including from a global vendor
directory). Basically you need to put a composer.json
with nemiah/php-fints
as a dependency in the same directory as tanModesAndMedia.php
and then run composer install
there, and it will create a vendor
directory there.
To make the SSL library in your PHP installation recognize that server's certificate, you need to install the certificate of the root CA that signed it. Most browsers come with a list of builtin root CAs (that's why that URL works in Chrome, for instance), but PHP does not. You can install the most common ones like this: https://stackoverflow.com/a/34883260
Thanks a lot for the hints. I managed to solve that, but now I get this one here:
>php tanModesAndMedia.php
debug: > HNHBK:1:3+000000000120+300+0+1'HKIDN:2:2+280:70150000+9999999999+0+0'HKVVB:3:3+0+0+0++1.0'HKTAN:4:6+4+HKIDN'HNHBS:5:1+1'
debug: < HNHBK:1:3+000000000164+300+0+1+0:1'HIRMG:2:2+9050::Die Nachricht enthlt Fehler.+9800::Dialog abgebrochen'HIRMS:3:2:3+9160:5:Pflichtfeld nicht gefunden'HNHBS:4:1+1'
PHP Fatal error: Uncaught Fhp\Protocol\ServerException: FinTS errors:
9050 (global): Die Nachricht enthält Fehler.
9800 (global): Dialog abgebrochen
9160 (wrt seg 3): Pflichtfeld nicht gefunden (wrt DE 5)
Request segments:
HKVVB:3:3+0+0+0++1.0' in C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\Protocol\ServerException.php:170
Stack trace:
#0 C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\FinTs.php(963): Fhp\Protocol\ServerException::detectAndThrowErrors(Object(Fhp\Protocol\Message), Object(Fhp\Protocol\Message))
#1 C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\FinTs.php(645): Fhp\FinTs->sendMessage(Object(Fhp\Protocol\Message))
#2 C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\FinTs.php(673): Fhp\FinTs->ensureBpdAvailable()
#3 C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\FinTs.php(532): Fhp\FinTs->ensureTanModesAvailable()
#4 C:\Users\test\vendor\nemiah\php-fints\lib\tanModesAndMedia.php(14): Fhp\FinTs->getTanModes()
#5 {main}
thrown in C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\Protocol\ServerException.php on line 170
What is wrong ?
EDIT
Comparing the stream with one from Jamaica/Hisicus log, I realized that I initially did not give any productName
in init.php
(and deactivated the corresponding error in validate()
function).
As soon as I entered a value for productName
, the script went through and I could select a TAN mode and a TAN media.
so the issue can be closed?
Yes, I will close it, thanks for assistance. Btw, great lib!
Hello,
I have tried to run use the lib in CLI-mode under Windows 10.
What I have done:
As a result, the lib got installed under:
C:\Users\test\vendor\nemiah\php-fints
First I filled the options information in
init.php
, then I tried the exampleSamples\tanModeAndMedia
using following line in a cmd window:As a result, I ran into this error:
'../vendor/autoload.php'
cannot be found I solved this by replacing line 8 of ini.php https://github.com/nemiah/phpFinTS/blob/5f6b4d3bf6916c0b5f90d70b1a98470cfe6a2a26/Samples/init.php#L8 with:require '../../../autoload.php';
But then I get this one:
Fatal error: Uncaught Fhp\CurlException: Failed connection to https://banking-by6.s-fints-pt-by.de/fints30: SSL certificate problem: unable to get local issuer certificate in C:\Users\test\vendor\nemiah\php-fints\lib\Fhp\Connection.php:78
SSL error.log
How can I get rid of this error?
Any answer is highly appreciated, thank you in advance.