mschindler83/fints-hbci-php

how to detect uniqueness

1manfactory opened this issue · 2 comments

Hello
the passed statement information do not include any unique identifier.
I want to store the information in an MySQL table. But how can I make sure not to store the same statement over and over again when calling the HBCI server?
Right now only the date offers a bit of uniqueness. But unfortunately the time is not given.
Juergen

I json_encode and then take a MD5 hash. You might find that your bank changes certain fields later on (for example, when a credit card transaction is finalized, the vendor name or other fields may be truncated or capitalization changes). In that case, you would have to exclude those fields before taking the hash.