Documentation
¶
Index ¶
- type Option
- type Provider
- func (p *Provider) CreateCheckoutSession(ctx context.Context, req ports.CheckoutSessionRequest) (ports.CheckoutSession, error)
- func (p *Provider) ListPrices(ctx context.Context) ([]ports.Price, error)
- func (p *Provider) ParseWebhook(ctx context.Context, payload []byte, sigHeader string) (ports.WebhookEvent, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Provider)
Option customizes Provider behavior.
func WithSkipVerify ¶
WithSkipVerify allows skipping webhook signature verification (dev only).
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements ports.PaymentProvider using Stripe Checkout + webhooks.
func (*Provider) CreateCheckoutSession ¶
func (p *Provider) CreateCheckoutSession(ctx context.Context, req ports.CheckoutSessionRequest) (ports.CheckoutSession, error)
CreateCheckoutSession creates a hosted checkout session for a single line item.
func (*Provider) ListPrices ¶
ListPrices fetches active prices from Stripe.
func (*Provider) ParseWebhook ¶
func (p *Provider) ParseWebhook(ctx context.Context, payload []byte, sigHeader string) (ports.WebhookEvent, error)
ParseWebhook verifies and parses the Stripe webhook payload.
Click to show internal directories.
Click to hide internal directories.