feat(stripe): update webhook event construction to ignore API version mismatches

This commit is contained in:
EUForest 2026-02-11 17:29:53 +08:00
parent 9ad602aabe
commit 7197f5dcf6

View File

@ -155,7 +155,9 @@ func (c *Client) QueryOrderStatus(orderNo string) (bool, error) {
// ParseNotify // ParseNotify
func (c *Client) ParseNotify(payload []byte, signature string) (*NotifyResult, error) { 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 { if err != nil {
return nil, err return nil, err
} }