#pavlos_elpidorou
1 messages · Page 1 of 1 (latest)
Can you share an example evt_xxx ID that is failing the signature check? Also your webhook handler code
Taking a look
Yeah your endpoint is returning a 500 error. Can you share the code?
basically we are using this PHP package to handle the webhook request, including verifying if the signature matches
Then I recommend you file an issue with that third-party library. They write and maintain that codebase
Otherwise: ensure that the whsec_xxx you're using in your code is the correct one for the webhook endpoint from your Dashboard
Hm ok. I see.
So there is no way to manually verify the signature from the webhook request against the whsec_xxx to verify that they match?
Well, you can. But it's cumbersome: https://stripe.com/docs/webhooks#verify-manually
Our SDKs have this tooling built in, which is what I assume that Larvael library wraps (the PHP SDK)
Yes. the package internally uses the stripe-php package
Yeah then if you're sure that the whsec_xxx secret in your code definitely matches the one from the Dashboard for the endpoint then the likelihood is the issue lies in the code
And unfortunately, as you've not written the code yourself, it's hard for us to help
After having a look at the package's code, on the controller which handles the webhook request, it creates a new WebhookConfig instance and then passes it to the WebhookProcessor along with the request
which then calls this isValid method
No idea what either of those classes are. They're not native Stripe code so I guess it's specific to that lib
and internally it calls Webhook::constructEvent which is the native stripe-php library code
Yeah the common issues with invalid secret signing is:
- The wrong
whsec_xxxbeing used - The request payload is being parse/malformed by some logic before it's passed to
constructEvent. That function expects the raw request body
If it doesn't match the signature from the headers, then it'll error
I suspect the issue is the latter, but you'd need to figure that out really as it's a third-party lib
is it possible for you to provide me with the raw request body for the specific event i've sent you - evt_3Oh46DCG5LI7m2080L1NMYDl - so i can do some investigation?
I can't no. You can re-trigger the event with the CLI though: https://stripe.com/docs/cli/events/resend
ok thank you very much