#senthil - webhook secret
1 messages · Page 1 of 1 (latest)
That is the endpoint signing secret. What are you trying to do?
those are two ways of describing the same thing
So i suspect you are looking for exactly that value
ok thanks for confirming. I was confused as it is called signing secret for some reason in the dashboard. So signing secret and end point secret are the same thing. Correct?
Correct
Ok, thanks. Have another related question. When I run this code below:
$event = null;
try {
$event = \Stripe\Event::constructFrom(
json_decode($payload, true), $sig_header, $endpoint_secret
);
} catch(UnexpectedValueException $e) {
// Invalid payload
http_response_code(400);
exit();
} catch(\Stripe\Exception\SignatureVerificationException $e) {
// Invalid signature
http_response_code(400);
exit();
}
And pass an INVALID endpoint_secret. I still don't get an exception.
and FYI: $payload = @file_get_contents('php://input');
Are you sure $endpoint_secret has the value you expect? Invalid secret suggests that might be missing or malformed. Are you getting the full value from your dashboard? There should not be any ... in the real value.
yes I put the ... for the chat. So the webhook suceeds and I get the payment info DESPITE putting in an incorrect secret!
am I missing something in the code. seems like the secret does NOT matter
which means someone else can send a fake one, and then that is a problem
Hi there! Stepping in for @brisk socket, as they needed to step away. One moment to get caught up.