diff --git a/src/Stripe.net/Services/Events/StripeEventUtility.cs b/src/Stripe.net/Services/Events/StripeEventUtility.cs index 0f5e67ccf2..9a30bec395 100755 --- a/src/Stripe.net/Services/Events/StripeEventUtility.cs +++ b/src/Stripe.net/Services/Events/StripeEventUtility.cs @@ -47,8 +47,8 @@ public static StripeEvent ConstructEvent(string json, string stripeSignatureHead var webhookUtc = Convert.ToInt32(signatureItems["t"].FirstOrDefault()); - if (utcNow - webhookUtc > tolerance) - throw new StripeException("The webhook cannot be processed because the current timestamp is above the allowed tolerance."); + if (Math.Abs(utcNow - webhookUtc) > tolerance) + throw new StripeException("The webhook cannot be processed because the current timestamp is outside of the allowed tolerance."); return Mapper.MapFromJson(json); }