Webhook::constructEvent( string $payload, string $sigHeader, string $secret, int $tolerance = self::DEFAULT_TOLERANCE )
Returns an Event instance using the provided JSON payload. Throws an Exception\UnexpectedValueException if the payload is not valid JSON, and an Exception\SignatureVerificationException if the signature verification fails for any reason.
Description Description
Parameters Parameters
- $payload
-
(Required) the payload sent by Stripe
- $sigHeader
-
(Required) the contents of the signature header sent by Stripe
- $secret
-
(Required) secret used to generate the signature
- $tolerance
-
(Optional) maximum difference allowed between the header's timestamp and the current time
Default value: self::DEFAULT_TOLERANCE
Return Return
(StripeEvent) the Event instance
Source Source
File: includes/gateways/stripe/vendor/stripe/stripe-php/lib/Webhook.php