Skip to content

Commit

Permalink
add stripe tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adelowo committed Feb 3, 2025
1 parent 618ce2a commit 66ff88e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ func (s *stripeHandler) handleWebhook(w http.ResponseWriter, r *http.Request) {
return
}

// Use ConstructEventWithOptions to ignore API version mismatch
opts := webhook.ConstructEventOptions{}
opts := webhook.ConstructEventOptions{
IgnoreAPIVersionMismatch: true,
}

ev, err := webhook.ConstructEventWithOptions(payload, r.Header.Get("Stripe-Signature"),
s.cfg.Billing.Stripe.WebhookSecret, opts)
if err != nil {
Expand Down

0 comments on commit 66ff88e

Please sign in to comment.