-
Notifications
You must be signed in to change notification settings - Fork 24
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
Enable FinTS persistence #156
Enable FinTS persistence #156
Conversation
Decoupled TAN modes tend to ask for a TAN in every import run. Using persist on the FinTS instance and loading it from the configuration.json file prevents that. The string is presented in the done step to be pasted into the configuration file. If it is present there, it is loaded in the FinTsFactory and used for initialising the FinTS connection. Refs bnw#149
Also provide the key in the configuration example.json Refs bnw#149
Hey there Julius, first of all thank you for your work, I am facing the same problem. Thank you and best regards |
Hi Niklas, |
Hey, thanks for the amazingly fast reply! I am also not proficient in PHP at all, but from your message and https://github.com/nemiah/phpFinTS/blob/874bda56f15333e699c4d89a940cdab4599a4efe/lib/Fhp/FinTs.php#L210 I would guess the changing string is |
I also investigated and came to the same conclusion, my end of the decoded string looks quite similar and the corresponding string deserialized into the While reading some of the functions' documentation it appeared to me, that:
This does not seem related for your problem, but we are talking about banks here, so maybe it matters...? |
Okay, sounds good, thank you :) Just to check, for you this works in that the firefly fints importer doesn't even ask for a tan? Or how does the "working" state of this look? |
I could not get it to work with the minimal persistence string, as that requires fetching the tan modes again and that would need a bit more refactoring I am willing to currently do. Maybe I'll investigate that further. To answer your question: Yes, that is what happening for me. Once I chose my TAN device (which is "Alle Geräte"/all devices) because of the decoupled TAN submission), I do not have to confirm in the TAN app or anything and the importer directly continues to "The connection to your bank was tested sucessfully." |
Hmm. I don't even get the select your tan device screen (instead it has a auto continuing screen that says "Your chosen tan mode does not require you to choose a device.") |
Choosing a tan device is bank specific, so this does not necessarily mean that this is not intended. Do you get a decoupled tan request or a synchronous one? |
Either way, thank you a lot for your quick replies and the jump into immediatly troubleshooting something that really is only tangntial to your PR :D |
From the de-serialized persistence object I would guess a decoupled one, at least that string appears a few times in there. |
Incorperating the last commit of yours, i.e., the closing, seems to now set the dialog id to null (as expected). Interestingly, this also changes the |
Much easier to find out: Do you get a text input or do you confirm using your tan method and the just hit continue in the importer?
It surely is, and I sadly cannot test this as I am not a DKB customer. |
The latter. It tells me to confirm, I confirm in the DKB app and then can press continue on the fints-importer.
Yeah, makes sense. Maybe someone else will come a long, eventually. Again, thanks for your help so far! |
At least its comforting to know it could potentially work for other banks but most importantly did not break anything for you. Even if the import process is kind of cumbersome this way. |
No absolutely, the issue was introduced by some change on DKBs side. On the contrary, your implementation for decoupled tan entry made the it work at all again, that persistent tan isn't working is annoying but very likely not your fault :D |
I'm happy it also helped you :)
I'm surely interested. But I think this now gets way out of scope of this PR, so make sure to contact me if you really start working on that. |
thank you so much for your contribution! The code is already looking good. If I understand it correctly, the change needs an update in the fints library, correct? Thanks a lot :) |
Hi @bnw, no, there is no update necessary. A freshly built docker image based on this branch works perfectly for me. Sadly it does not fix it for DKB imports as we found out above. |
@JuliusFreudenberger There likely isn't a fix for DKB, as the behavior seems to be intentional, sadly (more details here). |
I see. Thanks a lot then :) |
As discussed in #149, storing and loading the FinTS persistence string can prevent needing to enter a TAN on every import run. I also have this problem, since my Sparkasse switched to decoupled TAN submission (which I provided as a feature in #142 and #145).
This PR adds several things:
Done
step at the end of an import run with a description to add it into the configuration.CollectData
step and added to the constructor of the FinTS instance.For me, this works so that I do not have to approve the importer again and again on every run.
I also verified that everything works in a freshly built docker image with the current
php-FintTS
version specified by composer.