hello-one / laravel-webhooks
Parse incoming webhook requests from hello-one.de
Requires
- php: >=7.3
- ext-json: *
- laravel/framework: >5.6
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.5
- psr/log: ^1.1
This package is auto-updated.
Last update: 2024-12-18 10:42:15 UTC
README
Securely receive Webhooks from your hello one project.
Installation
-
You can install this package via composer using the following command:
composer require hello-one/laravel-webhooks
The package will automatically register itself using package discovery.
-
Add your app as a webhook on our dashboard. The default route is
https://{{yourdomain.com}}/hello-one/webhook
Please note: we only support TLS endpoints ("https only")
-
Copy the secret signing key
-
Add the secret signing key to your .env file
HELLO_ONE_WEBHOOK_SIGNING_SECRET={{INSERT_TOKEN_HERE}
-
Your app will now receive events from your hello one project. You can test the integration by sending a test-event from our dashboard
Usage
This package handles incoming webhook requests from hello one. It verifies the request signature of hello one webhook requests. When a request is valid the package emits and emits a Laravel Event
To react on any of the events you can create an event listener.
Listen to all webhook events with a wildcard:
Event::listen('hello-one.webhook.*', function (string $eventName, array $data) { Log::info('hello one event received: '. $eventName, $data); });
Listen to specific events:
Event::listen('hello-one.webhook.guest.created', function (string $eventName, array $data) { Log::info('A new Guest was just created', $data['guest']['id']); // use the data from $data['guest'] });
Event List
You can query the complete event list from our API
curl -X GET "https://api.hello-one.de/api/webhooks/events" -H "accept: application/json"
Please note: in Laravel all events are prefixed with hello-one.webhook.
Configuration
Publish the config file and adjust as needed
php artisan vendor:publish --tags 'hello-one-webhooks'
Documentation
Please notice our Webhook Documentation
Contributing
Feel free to open a ticket, submit a Pull Request or ask our Support Team