payment

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL