woovibr / php-sdk

OpenPix/Woovi PHP SDK
https://developers.openpix.com.br/docs/sdk/php/sdk-php-what-is
MIT License
11 stars 1 forks source link

feat(webhooks): add webhook validation method #34

Closed criskell closed 1 year ago

criskell commented 1 year ago

This PR addresses #33.

isWebhookValid method has been added to the Webhooks resource:

// Basic usage:

 $payload = file_get_contents("php://input");
 $signature = getallheaders()["x-webhook-signature"];

 $client->webhooks()->isWebhookValid($payload, $signature);