Closed jesseSalonen closed 2 years ago
@jesseSalonen Were you aware that we have made PHP-SDK available as well? https://github.com/paytrail/paytrail-php-sdk
It might help you get up and running faster.
@loueranta-paytrail I weren't aware of that, thank you!
Now everything seems to be working correctly!
Hello!
I'm trying to integrate Paytrail into my Laravel API, but have now ran into problems.
I have been testing the API for a while now and can't get the response's signature header to match with my own calculated one. I have used the documentation HMAC example with php to test the endpoint for creating a new payment.
My own calculated HMAC is the same as in the example with same header values, but I get the "signature mismatch" -error in response. I can' find the source for this problem.
Is there something wrong with my code, or am I missing something?
Thank you for your help!
The code:
The payload for HMAC function:
HMAC:
3708f6497ae7cc55a2e6009fc90aa10c3ad0ef125260ee91b19168750f6d74f6
Here are all the request headers:
The response:
{"status":"error","message":"Signature mismatch"}