Download the PHP package siewwp/laravel-service-consumer without Composer
On this page you can find all versions of the php package siewwp/laravel-service-consumer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download siewwp/laravel-service-consumer
More information about siewwp/laravel-service-consumer
Files in siewwp/laravel-service-consumer
Package laravel-service-consumer
Short Description laravel server-to-server service consumer with HMAC authentication
License MIT
Informations about the package laravel-service-consumer
Laravel hmac http
Server-to-server service consuming with hmac authentication.
Installation
Usage
Binding your key
Your should bind your app id and secret at your ServiceProvider
.
Refer to Hmac http client for more information.
Refer to Laravel Container for more information.
Handling webhook notification
If the service host is notifying event using webhook, you may define your webhook handler in your controller and extend to the webhook controller like so:
Or you can use the Siewwp\LaravelServiceConsumer\HandleWebhook
trait in your controller
The name of the webhook method should be 'handle' + 'CamelCase'
of the type of event notification. In the example above,
is to handle InvoicePaid
type event.
Refer to laravel-service-host for more information.
After that, you may register the webhook controller it on RouteServiceProvider.php
file.
You can also register it on your
web
routes but you may need to exclude CSRF middleware
TO DO
TESTING
All versions of laravel-service-consumer with dependencies
zendframework/zend-diactoros Version ^1.7
siewwp/php-hmac-http Version ^1.1.2