pub struct Webhook { /* private fields */ }
Implementations§
source§impl Webhook
impl Webhook
sourcepub fn construct_event(
payload: &str,
sig: &str,
secret: &str
) -> Result<WebhookEvent, WebhookError>
pub fn construct_event(
payload: &str,
sig: &str,
secret: &str
) -> Result<WebhookEvent, WebhookError>
Errors
This function will return a WebhookError if:
- the provided signature is invalid
- the provided secret is invalid
- the signature timestamp is older than 5 minutes