webhook_service_interface
Webhook Service Interface.
Handles incoming webhooks, including authentication and dispatching.
Table of Contents
Methods
- validate_signature() : bool
- Validate an incoming webhook signature using HMAC.
Methods
validate_signature()
Validate an incoming webhook signature using HMAC.
public
validate_signature(string $payload, string $signature, string $secret[, string $algo = 'sha256' ]) : bool
Parameters
- $payload : string
-
The raw request body
- $signature : string
-
The signature provided in the header
- $secret : string
-
The shared secret key
- $algo : string = 'sha256'
-
The hashing algorithm (default: sha256)