1. Go to this page and download the library: Download jmsfwk/lumen-webhook-server library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// payload is the array passed to the `payload` method of the webhook
// secret is the string given to the `signUsingSecret` method on the webhook.
$payloadJson = json_encode($payload);
$signature = hash_hmac('sha256', $payloadJson, $secret);
namespace Spatie\WebhookServer\Signer;
interface Signer
{
public function signatureHeaderName(): string;
public function calculateSignature(array $payload, string $secret): string;
}