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


Top ↑

Return Return

(StripeEvent) the Event instance


Top ↑

Source Source

File: includes/gateways/stripe/vendor/stripe/stripe-php/lib/Webhook.php


			

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.