Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
hello,
I'm trying to verify the webhook sent from shopify over to my laravel project and i followed the documentation from this link https://shopify.dev/tutorials/manage-webhooks#verify-webhook and I'm still unable to verify the webhook, if any more information is needed i will be happy to provide
Hi @ostamustafa
We can try and help out but we'll need more information. Can you provide some errors and/or logs? With that, we can then try and point you in the right direction.
Cheers,
Mike
To learn more visit the Shopify Help Center or the Community Blog.
I am receiving the webhook to my project and when i try to verify the webhook by checking the hmac header it will give me that the verification process i followed is producing an non-equal hmac hash
private function verifyWebhook(string $data, string $hmacHeader, string $appSecret)
{
$calculatedHmac = base64_encode(hash_hmac('sha256', $data, $appSecret, true));
return hash_equals($hmacHeader, $calculatedHmac);
}
I'm getting the $data via
file_get_contents('php://input')
and the $appSecret from the shopify dashboard which beings with shpss_
and the $hmacHeader via
$request->header('X-Shopify-Hmac-Sha256')
Am I doing anything wrong?
I have the same problem, but in my case works only "CreateUser" Webhook.
For all the other Webhook I have the same problem as you.