PHP Class EventHomes\Api\Webhooks\MandrillWebhookController

Inheritance: extends Illuminate\Routing\Controller
Afficher le fichier Open project: eventhomes/laravel-mandrillhooks

Méthodes publiques

Méthode Description
generateSignature ( string $webhook_key, string $url, array $params ) https://mandrill.zendesk.com/hc/en-us/articles/205583257-How-to-Authenticate-Webhook-Requests Generates a base64-encoded signature for a Mandrill webhook request.
handleWebHook ( Illuminate\Http\Request $request ) : Response Handle the Mandrill webhook and call method if available

Private Methods

Méthode Description
getJsonPayloadFromRequest ( $request ) : array Pull the Mandrill payload from the json
validateSignature ( Illuminate\Http\Request $request ) : boolean Validates the signature of a mandrill request if key is set

Method Details

generateSignature() public méthode

https://mandrill.zendesk.com/hc/en-us/articles/205583257-How-to-Authenticate-Webhook-Requests Generates a base64-encoded signature for a Mandrill webhook request.
public generateSignature ( string $webhook_key, string $url, array $params )
$webhook_key string the webhook's authentication key
$url string the webhook url
$params array the request's POST parameters

handleWebHook() public méthode

Handle the Mandrill webhook and call method if available
public handleWebHook ( Illuminate\Http\Request $request ) : Response
$request Illuminate\Http\Request
Résultat Symfony\Component\HttpFoundation\Response