Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentHandler ¶
type PaymentHandler struct { StripeClient *StripeClient DB *database.Queries }
PaymentHandler manages Stripe payment and refund operations.
func (*PaymentHandler) CreatePaymentIntent ¶
func (h *PaymentHandler) CreatePaymentIntent(w http.ResponseWriter, r *http.Request, user database.User)
CreatePaymentIntent handles the creation of a new payment intent.
func (*PaymentHandler) CreateRefund ¶
func (h *PaymentHandler) CreateRefund(w http.ResponseWriter, r *http.Request, user database.User)
CreateRefund handles the creation of a new refund.
func (*PaymentHandler) HandleWebhook ¶
func (h *PaymentHandler) HandleWebhook(w http.ResponseWriter, r *http.Request)
HandleWebhook handles incoming webhook events from Stripe.
type StripeClient ¶
StripeClient wraps the Stripe API client
func NewStripeClient ¶
func NewStripeClient(secretKey string) *StripeClient
NewStripeClient creates a new StripeClient instance
Click to show internal directories.
Click to hide internal directories.