PHP code example of ayodvr / laravel-webhook-manager
1. Go to this page and download the library: Download ayodvr/laravel-webhook-manager 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/ */
ayodvr / laravel-webhook-manager example snippets
namespace App\Listeners;
use Cybrox\WebhookManager\Events\WebhookReceived;
class ProcessWebhook
{
public function handle(WebhookReceived $event): void
{
$webhookEvent = $event->webhookEvent;
// Process based on provider
if ($webhookEvent->provider === 'paystack') {
$payload = json_decode($webhookEvent->payload, true);
// Your logic here...
}
}
}