From ea94f3c9f97f2f7d6a9ca2691966de3a49d3a8ea Mon Sep 17 00:00:00 2001 From: Chang lue Tsen Date: Sun, 8 Feb 2026 06:43:34 -0500 Subject: [PATCH] feat(stripe): update webhook event construction to ignore API version mismatches --- pkg/payment/stripe/stripe.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/payment/stripe/stripe.go b/pkg/payment/stripe/stripe.go index d0f4af6..ced0499 100644 --- a/pkg/payment/stripe/stripe.go +++ b/pkg/payment/stripe/stripe.go @@ -155,7 +155,9 @@ func (c *Client) QueryOrderStatus(orderNo string) (bool, error) { // ParseNotify func (c *Client) ParseNotify(payload []byte, signature string) (*NotifyResult, error) { - event, err := webhook.ConstructEvent(payload, signature, c.Config.WebhookSecret) + event, err := webhook.ConstructEventWithOptions(payload, signature, c.Config.WebhookSecret, webhook.ConstructEventOptions{ + IgnoreAPIVersionMismatch: true, + }) if err != nil { return nil, err }