Download the PHP package renatoxm/laravel-vonage-dlr-webhooks without Composer
On this page you can find all versions of the php package renatoxm/laravel-vonage-dlr-webhooks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-vonage-dlr-webhooks
LaravelVonageDlrWebhooks
Handle Vonage DLR (delivery receipt) SMS webhooks in Laravel php framework. Take a look at contributing.md to see a to do list.
When you make a successful request to the SMS API, it returns an array of message objects, one for each message. Ideally these will have a status of 0, indicating success. But this does not mean that your message has reached your recipients. It only means that your message has been successfully queued for sending.
Vonage's adaptive routing then identifies the best carrier for your message. When the selected carrier has delivered the message, it returns a delivery receipt (DLR).
To receive DLRs in your application, you must provide a webhook for Vonage to send them to. Alternatively, you could use the Reports API to periodically download your records, including per-message delivery status.
Installation
Via Composer
Publish the config file with:
This package will log all incoming webhooks to the database by default.
Run the migrations to create a vonage_dlr_webhook_logs
table in the database:
Setup DLR (delivery receipt) webhooks from Vonage
Create your account at dashboard API settings.
Under SMS settings, choose SMS API, set the webhook format to POST-JSON
, and configure Delivery receipts (DLR) webhooks URL like this:
https://<you-domain.com>/api/webhooks/vonage/dlr
/api/webhooks/vonage/dlr
is the package's default endpoint.
You may change the
/api/webhooks/vonage/dlr
endpoint to anything you like.
You can do this by changing thepath
key in theconfig/laravel-vonage-dlr-webhooks.php
file.
Events
Whenever a webhook call comes in, this package will fire a LaravelVonageDlrWebhooksCalled
event.
You may register an event listener in the EventServiceProvider
:
Example of a listener:
Advanced configuration
You may optionally publish the config file with:
Within the configuration file you may change the table name being used or the Eloquent model being used to save log records to the database.
If you want to use your own model to save the logs to the database you should extend the
Renatoxm\LaravelVonageDlrWebhooks\Model\LaravelVonageDlrWebhooksModel
class.
You can also exclude one or more event types from being logged to the database.
Place the events you want to exclude under the except
key:
All webhook requests will be logged in the vonage_dlr_webhook_logs
table.
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security issue, please email renatoxm[at]gmail[dot]com
instead of using the issue tracker.
Useful Links
Acknowledgment
This package is inspired by:
forked from https://github.com/mvdnbrk/laravel-postmark-webhooks
Credits
- Renato Nabinger
- All Contributors
License
MIT. Please see the license file for more information.
All versions of laravel-vonage-dlr-webhooks with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/http Version ^10.0 || ^11.0
illuminate/support Version ^10.0 || ^11.0
vonage/client-core Version ^4.6