stripe

package
v0.0.0-...-1f4ab60 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

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

type StripeClient struct {
	Client *client.API
}

StripeClient wraps the Stripe API client

func NewStripeClient

func NewStripeClient(secretKey string) *StripeClient

NewStripeClient creates a new StripeClient instance

Jump to

Keyboard shortcuts

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