#Kamiyabali-webhook
1 messages ยท Page 1 of 1 (latest)
Php SDK
Hi @versed swift I'm taking over, is it about signature verification?
yes
I have webhook_secret like this we_1LeZ8BSAvJMUlJgAGOD77zPs
is this correct ??
cause everyone has secret start with
whsec_
okay , i found iam using wrong signing secret.
no, we_xxx is not a webhook secret.
let me check with this whsec_8XNdl1BGm14Xs5Skz6tZ8nO4QWvEtlEd
still got this No signatures found matching the expected signature for payload
stripe-signature:
t=1662441040,v1=a7ab5589af994cacee5c978274bf2f0031a4757900c20ff6e21d26312db92041,v0=d60867f09d96965ba8fb1aa6d9fdb40b0f0b44ed7b899c4ecc03471766cf7710
Hello ???
Thanks for the waiting. Discord is busy.
Did you get the webhook secret from CLI or Dashboard?
so CLI or Dashboard?
dashboard
i got this details
can you check from your end ??
Yes I'm checking
please also remove webhook secret from this chat, discord is a public place
Can you share with me the full source code?
text file please
Can you change $sig_header = $request->header('stripe-signature'); to
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; ?
Also change $payload = file_get_contents('php://input'); to $payload = @file_get_contents('php://input');
still same issue.
can you do a echo $sig_header and see what you get?
string(148) "t=1662441040,v1=a7ab5589af994cacee5c978274bf2f0031a4757900c20ff6e21d26312db92041,v0=d60867f09d96965ba8fb1aa6d9fdb40b0f0b44ed7b899c4ecc03471766cf7710"
I know I've asked, but can you do a echo $endpoint_secret and see if it returns the correct webhook secret? You don't need to paste the result here.
yes it returns correct
Your code looks OK to me, it should work if the webhook secret is set correctly.
I am sure about the webhook secret it is correct
Can you tell me how can i verify it manually?
i have tried this but not verified
Here's the doc for verifying manually https://stripe.com/docs/webhooks/signatures#verify-manually
But I really recommend you to use the official library instead of doing it manually.
Tried already but not not match signature
is there any problem of not activating payments ??
What do you mean by not activating payments ?
Ah, this is about activating your account.
You need to activate if you want to switch to live mode, but you can continue in test mode without activating
so signature verification working fine in test mode right ??
Yes, it will work in test mode
Can i suggest you to write in to us ( https://support.stripe.com/contact) and send us the whole project so that we can reproduce the problem?
is there any use of this webhook ID ?
You can use this ID to programmatically manage the webhook endpoint (https://stripe.com/docs/api/webhook_endpoints/update?lang=cli#update_webhook_endpoint)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.