mschindler83/fints-hbci-php

Direct debit (via SEPA XML) and key chain (as TAN)

Chiller999 opened this issue ยท 23 comments

Hello,
thanks for this great work!

Will it be possible to send direct debit (Lastschriften, ggf. via SEPA XML) and confirm this via key chain file (without classic TAN procedure)?

It would help a lot clubs and small business. Thanks.

Hi @Chiller999
Thanks for the compliment!

This would be a great feature. I would love to implement this.
But it is not easy and will take a decent amount of time to implement.

I hope I will have time for it in the near future.

Hi @mschindler83,

happy new year 2017!

I need to follow the words from @Chiller999: great work! I would also like to see the possibility to do SEPA-XML direct debits in this code. If you would like to share your information sources on how this functionality can be achieved. I would like to help you with the coding and testing.

Cheers
Andi

Hi again, I just had a quick look and it looks like only the HKDSE segment is missing. I found all other segments which are used in the FinTS tool I'm using right now. The HKDSE segment in my example only puts some easy readable stuff together:

  • iban
  • bic
  • account number
  • country code
  • blz
  • pain xsd version
  • the content of the sepa-xml

Maybe there are some bummers in between but it looks not that complicated with the base you've already coded.

Cheers
Andi

Hi @inbaz
Thanks for evaluating!
I will give it a try as soon as I have some time.
This would be a really great feature and should be implemented quite quickly.

But I see here two features. The second one - namely the key file to avoid TAN - is another story...

Hi,

thanks for your answer. You're absolutely right. The first thing to do is to get this feature work with a PIN/TAN procedure, but there is already:

  • iTan
  • mTan
  • sm@rt-Tan
  • and surely some more
    At the moment I don't know if this will make any difference or if the tan procedure needs to be requested within the dialogue.

I think if at least two of the above methods are working it should be possible to implement the method with the keyfile as a separate method next to the existing tan method.

It would be really great to see this feature in this module.

Cheers
Andi

P.S.: Happy Easter! :)

Hi guys,

I found this great project this morning and I've already added it to my own software :)

Do you need help implementing direct debit functionality?

Because if direct debit with mTAN would work, I could finally automate billing :)

Best wishes,
Nena

Hi again,

I looked into it and I thought it would be good for testing purposes to implement SEPA transfer first. Also I suppose transfer and direct debit are quite equal.

This nice document states we need to implement HKCCS for that.

As far as I understand it, HKCCS uses the SEPA pain files to transmit the actual information. I already wrote PHP classes to create this file format for direct debit. So it will be easy to do the same for the transfer information and provide it as library. You'll hear from me in the following days.

Best wishes,
Nena

Hi Nena,

I would really enjoy to see if you're able to implement a basic SEPA functionality to this module. If you need somebody to do some testing when there is progress, just give me a ping.

Cheers
Andi

Hi there,

ok, it took quite a bit of research, but my branch can now request and delete a standing order including transmitting the mTAN.

I know, that's still no transfer, but the TAN process should be the same ๐Ÿ˜„.

I'd love to get feedback if it works with your bank.

Best wishes
Nena

Ok, SEPA transfer now working for me in my branch ๐Ÿ˜

I'll do direct debit tomorrow.

Best wishes
Nena

@inbaz Direct debit is working now in my branch! I had to do it with another bank and they used another TAN mechanism. So it took a bit longer to figure out how it works. ๐Ÿ˜€

@mschindler83 We can merge the code, if you want to. Just to keep working on the same code...

Best wishes
Nena

Hi guys,

I also wrote an Android app to deliver incoming SMS to an URL: sms2url

I'm getting close to automatic billing ๐Ÿ˜„

Best wishes
Nena

@nemiah Very great work! sms2url is also a good idea for automatic billing ;)

But it would be "Non plus ultra" when it would be possible to generate/use simple key chain file for automatic transfer. Are there any ideas about this feature?

@Chiller999 The problem is, that I have no account with a keyfile. That means even if I started implementing it, I couldn't test it. And sadly that makes it quite impossible...

@nemiah Do you have any plans to push your improvements back to this main project?

@dennisoehme yes, I had. But mschindler83 did not react to my request, so I made a lot of changes in the mean time and I've given up on that plan :(

Best wishes,
Nena

@nemiah Okay, that are bad news. I created this PR #77, but had no reactions from @mschindler83, too.

The changes in my PR are on the same code lines like changes you're already done [1] in your code, but you're handling "Stornos" (cancellation) on a different (I think in a better) way. ;-)

So, maybe I'll switching to your fork. Do you any plans to integration travis again?

[1] nemiah/phpFinTS@079e13c

@dennisoehme Yes, I've seen your PR and thought about your approach. I decided against handling "Storno" differently because it doesn't matter in my use case and if it is important to someone in the future, it's changed easily.

You mean "https://travis-ci.org"? I didn't realize, I removed it ๐Ÿ˜†
I have no plans adding something I don't miss, but you can have a shot at it, if you want to ๐Ÿ˜„

Best wishes,
Nena

Hi all,
Sorry for reacting so slowly but there is a lot of stuff going on in my "paid time ;)".

@nemiah If you want to get something here in the master branch, you have to create a PR for that.
Then we can decide if we want to take it into the library or not.

But to be honest, I like the feature you implemented but I do not like the way how you implemented it. Especially this "for loop" to get the TAN and the way how you get the TAN (read file).

This makes it way more complicated (or even impossible) to use the library in a web application. I know there is a way to handle this workflow more asynchron.

https://github.com/nemiah/phpFinTS/blob/079e13c70d2c26daa64739248e5ba12a0a23ea41/lib/Fhp/FinTs.php#L460

Also the code style should match more the PSR standard. For example NEVER use tabs for indention. Always use 4 spaces for that.

But please, make the PR and we discuss the needed changes :)

Best,
Markus

@mschindler83 yes, I didn't like the file version myself and changed it to a callback-version. It still requires the loop though. What way would you suggest to wait for the TAN?

I already use it in my own console and web application (open3A) and it works fine :)

When you didn't respond I decided to make more changes.
I assume it's quite complicated now to get my changes into your version...

Best wishes,
Nena

@nemiah How can you ask the user in a web application for the TAN when the script blocks the whole application for 60 seconds? Do you start a separate PHP thread for this? I'm curious :)

The better solution would be:
You can have a open Dialog between different open tcp connections.

  1. Start Dialog
  2. Request TAN (remember dialog ID, last message number and order reference from HITAN)
  3. Close connection. Do not send "::endDialog()" (therefore application is not blocked for 60 secs.)
  4. Return user back to a form where he can enter his TAN after he received it
  5. Continue Dialog with remembered dialog ID and last message number +1 and transfer TAN with order reference to the Bank

Best, Markus

@mschindler83 Yes, somehow I run a separate thread in the background and poll the user for the TAN. I actually can't remember the exact way I've done it because I built it a few years ago for AQBanking ;)

OK, I suspected that I can break the connection but I have no clue how the HBCI protocol works and didn't really want to dive too deep into the specs ๐Ÿ˜

Best wishes,
Nena

@mschindler83 OK, it works now without callback and with interrupted connection :)

Best wishes,
Nena