MCPcopy Create free account
hub / github.com/bytebase/bytebase / processEvent

Method processEvent

backend/api/stripe/webhook.go:82–96  ·  view source on GitHub ↗
(ctx context.Context, event *stripego.Event)

Source from the content-addressed store, hash-verified

80}
81
82func (h *WebhookHandler) processEvent(ctx context.Context, event *stripego.Event) error {
83 switch event.Type {
84 case
85 "customer.subscription.created",
86 "customer.subscription.updated",
87 "customer.subscription.deleted",
88 "customer.subscription.paused",
89 "customer.subscription.resumed":
90 return h.handleSubscriptionStatusChange(ctx, event)
91 case "invoice.paid":
92 return h.handleInvoicePaid(ctx, event)
93 default:
94 return nil
95 }
96}
97
98func (h *WebhookHandler) handleSubscriptionStatusChange(ctx context.Context, event *stripego.Event) error {
99 var sub stripego.Subscription

Callers 1

handleCallbackMethod · 0.95

Calls 2

handleInvoicePaidMethod · 0.95

Tested by

no test coverage detected