mschindler83 / fints-hbci-php

A PHP library to communicate with FinTS / HBCI Servers
MIT License
130 stars 62 forks source link

how to detect uniqueness #55

Closed 1manfactory closed 7 years ago

1manfactory commented 7 years ago

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

Philipp91 commented 7 years ago

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.

1manfactory commented 7 years ago

Thanks. I think this offers a good way of handling it, http://stackoverflow.com/questions/40128139/generate-a-unique-key-for-banking-transactions