checkout

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPendingSessions

func GetPendingSessions(checkoutSvc *checkout.Service, authSvc *authsvc.Service) fiber.Handler

GetPendingSessions returns a Fiber handler for retrieving pending checkout sessions. for the current user. @Summary Get pending checkout sessions @Description Retrieves a list of pending checkout sessions for the authenticated user. @Tags checkout @Accept json @Produce json @Success 200 {object} common.Response "Pending sessions fetched" @Failure 401 {object} common.ProblemDetails "Unauthorized" @Failure 500 {object} common.ProblemDetails "Internal server error" @Router /checkout/sessions/pending [get] @Security Bearer

func Routes

func Routes(
	app *fiber.App,
	checkoutSvc *checkout.Service,
	authSvc *authsvc.Service,
	cfg *config.App,
)

Routes registers HTTP routes for checkout-related operations.

Types

type SessionDTO

type SessionDTO struct {
	ID            string    `json:"id"`
	TransactionID string    `json:"transaction_id"`
	UserID        string    `json:"user_id"`
	AccountID     string    `json:"account_id"`
	Amount        int64     `json:"amount"`
	Currency      string    `json:"currency"`
	Status        string    `json:"status"`
	CheckoutURL   string    `json:"checkout_url"`
	CreatedAt     time.Time `json:"created_at"`
	ExpiresAt     time.Time `json:"expires_at"`
}

SessionDTO represents a checkout session for API responses.

Jump to

Keyboard shortcuts

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