Documentation
¶
Index ¶
- type PayPalHandler
- type StripeHandler
- func (h *StripeHandler) CancelSubscription(c *gin.Context)
- func (h *StripeHandler) ChangePlan(c *gin.Context)
- func (h *StripeHandler) CreateCheckoutSession(c *gin.Context)
- func (h *StripeHandler) CreatePortalSession(c *gin.Context)
- func (h *StripeHandler) ListInvoices(c *gin.Context)
- func (h *StripeHandler) Webhook(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PayPalHandler ¶
type PayPalHandler struct {
Store *store.Store
ClientID string
ClientSecret string
WebhookID string
Sandbox bool
BaseURL string
Email *service.EmailService
WebhookSvc *service.WebhookService
}
func (*PayPalHandler) CancelSubscription ¶
func (h *PayPalHandler) CancelSubscription(c *gin.Context)
CancelSubscription cancels a PayPal subscription.
func (*PayPalHandler) CancelSubscriptionByID ¶
func (h *PayPalHandler) CancelSubscriptionByID(ctx context.Context, subscriptionID, reason string) error
CancelSubscriptionByID cancels a PayPal subscription by its ID. This is used by admin handlers to cancel subscriptions during refunds.
func (*PayPalHandler) CreateSubscription ¶
func (h *PayPalHandler) CreateSubscription(c *gin.Context)
CreateSubscription creates a PayPal subscription for a plan.
func (*PayPalHandler) Webhook ¶
func (h *PayPalHandler) Webhook(c *gin.Context)
Webhook handles PayPal webhook notifications.
type StripeHandler ¶
type StripeHandler struct {
Store *store.Store
WebhookSecret string
BaseURL string
Email *service.EmailService
WebhookSvc *service.WebhookService
}
func (*StripeHandler) CancelSubscription ¶
func (h *StripeHandler) CancelSubscription(c *gin.Context)
func (*StripeHandler) ChangePlan ¶
func (h *StripeHandler) ChangePlan(c *gin.Context)
func (*StripeHandler) CreateCheckoutSession ¶
func (h *StripeHandler) CreateCheckoutSession(c *gin.Context)
func (*StripeHandler) CreatePortalSession ¶
func (h *StripeHandler) CreatePortalSession(c *gin.Context)
CreatePortalSession creates a Stripe billing portal session for the user to manage payment methods.
func (*StripeHandler) ListInvoices ¶
func (h *StripeHandler) ListInvoices(c *gin.Context)
ListInvoices returns invoice history for a license's Stripe customer.
func (*StripeHandler) Webhook ¶
func (h *StripeHandler) Webhook(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.