mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-30 10:25:40 +02:00
Deleting account deletes subscription
This commit is contained in:
parent
4e51a715c1
commit
45b97c7054
5 changed files with 67 additions and 1 deletions
server
|
@ -359,6 +359,7 @@ type stripeAPI interface {
|
|||
GetSession(id string) (*stripe.CheckoutSession, error)
|
||||
GetSubscription(id string) (*stripe.Subscription, error)
|
||||
UpdateSubscription(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)
|
||||
CancelSubscription(id string) (*stripe.Subscription, error)
|
||||
ConstructWebhookEvent(payload []byte, header string, secret string) (stripe.Event, error)
|
||||
}
|
||||
|
||||
|
@ -407,6 +408,10 @@ func (s *realStripeAPI) UpdateSubscription(id string, params *stripe.Subscriptio
|
|||
return subscription.Update(id, params)
|
||||
}
|
||||
|
||||
func (s *realStripeAPI) CancelSubscription(id string) (*stripe.Subscription, error) {
|
||||
return subscription.Cancel(id, nil)
|
||||
}
|
||||
|
||||
func (s *realStripeAPI) ConstructWebhookEvent(payload []byte, header string, secret string) (stripe.Event, error) {
|
||||
return webhook.ConstructEvent(payload, header, secret)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue