checkout

package
v1.46.10 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 70 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FailedToCreateCustomer       = errors.New("Failed to create customer")
	FailedToCreateUser           = errors.New("Failed to create user")
	FailedToDecodeRequestBody    = errors.New("Failed to decode request body")
	FailedToReserveItem          = errors.New("Item already reserved")
	FeeCalculationError          = errors.New("Failed to calculate fees")
	FundingAccountCreationError  = errors.New("Failed to create funding account")
	InvalidOrIncompleteOrder     = errors.New("Invalid or incomplete order")
	OnlyOneOfUserBuyerAllowed    = errors.New("Only one of user buyer allowed")
	OrderDoesNotExist            = errors.New("Order does not exist")
	PaymentCancelled             = errors.New("Payment was cancelled")
	TokenSaleNotFound            = errors.New("Token sale not found")
	TransactionLimitReached      = errors.New("Transaction Amount May Not Exceed Limit of 5000000")
	UnsupportedBitcoinCurrency   = errors.New("BTC/XBT is supported for 'bitcoin' payment method")
	UnsupportedEthereumCurrency  = errors.New("Only ETH is supported for 'ethereum' payment method")
	UnsupportedPaymentType       = errors.New("Unsupported payment type")
	UnsupportedFiatCurrency      = errors.New("XBT(BTC), ETH not supported by fiat payment method")
	UserDoesNotExist             = errors.New("User does not exist")
	UserNotProvided              = errors.New("None of user, user.id, order.userId is set")
	WalletCreationError          = errors.New("Failed to create wallet for user")
	MissingTokenSaleOrPassphrase = errors.New("order.tokenSaleId or tokenSale.passphrase is missing")
	OrderTotalIsLessThan1        = errors.New("order.total is less than 1")
	AuthorizationFailed          = errors.New("Failed to authorize")
)

Functions

func Authorize

func Authorize(c *gin.Context)

func Cancel

func Cancel(c *gin.Context)

func Capture

func Capture(c *gin.Context)

func Charge

func Charge(c *gin.Context)

func Confirm

func Confirm(c *gin.Context)

func Refund

func Refund(c *gin.Context)

func Route

func Route(router router.Router, args ...gin.HandlerFunc)

func Sessions

func Sessions(c *gin.Context)

Sessions creates a provider-agnostic hosted checkout session.

Currently implemented using Square Payment Links (hosted checkout URL). When providerHint is "wire", returns wire transfer instructions instead.

Types

type Authorization

type Authorization struct {
	User      *user.User       `json:"user"`
	Payment   *payment.Payment `json:"payment"`
	Order     *order.Order     `json:"order"`
	TokenSale *TokenSale       `json:"tokenSale"`
}

func (*Authorization) Init

func (a *Authorization) Init(db *datastore.Datastore) error

type TokenSale

type TokenSale struct {
	Passphrase string `json:"passphrase"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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