#anndonnelly
1 messages · Page 1 of 1 (latest)
Have you tried starting with our Quickstart code? It's a good way to get going without too much effort up front.
https://stripe.com/docs/webhooks/quickstart
I have
my current error message
Stripe\Exception\SignatureVerificationException: No signatures found matching the expected signature for payload in file /var/app/current/vendor/stripe/stripe-php/lib/Exception/SignatureVerificationException.php on line 28
And this is getting thrown by which function?
Why would you think the signature header is in your environment? It's a value we pass in the HTTP headers array
For instance, our PHP webhook quickstart uses the following approach:
if ($endpoint_secret) {
// Only verify the event if there is an endpoint secret defined
// Otherwise use the basic decoded event
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
Current error
Stripe\Exception\SignatureVerificationException: Unable to extract timestamp and signatures from header in file /var/app/current/vendor/stripe/stripe-php/lib/Exception/SignatureVerificationException.php on line 28
Controller :
$sig = $request->header('HTTP_STRIPE_SIGNATURE');
return response()->json($this->webhook($request->all(), $sig));
}```
Okay I can't really just debug these line by line.
Do you have an example signature
First start with this php file: https://stripe.com/docs/webhooks/quickstart?lang=php
Then we can work towards your approach and see where it breaks
This is where I did start but $_SERVER will not work with laravel
Is there a laravel example?
We don't have a laravel specific example I'm afraid. You can review signature verification here: https://stripe.com/docs/webhooks/signatures