ondrakoupil / csob

PHP client for ČSOB payment gateway eAPI
MIT License
44 stars 18 forks source link

API returned HTTP code 400, which is not code 200. Probably wrong signature, check crypto keys. #7

Closed hranicka closed 7 years ago

hranicka commented 7 years ago

Hello.

Since v1.7 I get error "API returned HTTP code 400, which is not code 200. Probably wrong signature, check crypto keys." when somebody realizes a payment.

I changed nothing in codebase and when I downgrade to v1.5.4 then everyhing works fine.

We've contacted CSOB support and get a response we are sending a parameter "ttlSec" which is not included in a signature chain string.

Thank you for your help.

ondrakoupil commented 7 years ago

Hi, ttlSec should be added to signature base automatically. Are you setting it manually in payment object, or leaving it on default value? Also, are you using the latest library version? Can you post the signature base? You can get it from log if you use setTraceLog(). On the very end of the string, you should see the ttlSec value.