payment

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Gateways = make(map[string]PaymentProcessor)

Functions

This section is empty.

Types

type PayMoney

type PayMoney struct {
	Amount   float64
	Currency model.CurrencyType
}

type PaymentProcessor

type PaymentProcessor interface {
	Name() string
	Pay(config *types.PayConfig, gatewayConfig string) (*types.PayRequest, error)
	CreatedPay(notifyURL string, gatewayConfig *model.Payment) error
	HandleCallback(c *gin.Context, gatewayConfig string) (*types.PayNotify, error)
}

type PaymentService

type PaymentService struct {
	Payment *model.Payment
	// contains filtered or unexported fields
}

func NewPaymentService

func NewPaymentService(uuid string) (*PaymentService, error)

func (*PaymentService) CreatedPay

func (s *PaymentService) CreatedPay() error

func (*PaymentService) HandleCallback

func (s *PaymentService) HandleCallback(c *gin.Context, gatewayConfig string) (*types.PayNotify, error)

func (*PaymentService) Pay

func (s *PaymentService) Pay(tradeNo string, amount float64, user *model.User) (*types.PayRequest, error)

Directories

Path Synopsis
gateway

Jump to

Keyboard shortcuts

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