web

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Type          int64  `json:"type,omitempty"`
	Desc          string `json:"desc,omitempty"`
	Amount        int64  `json:"amount"`
	WechatCodeURL string `json:"wechatCodeURL,omitempty"` // 微信二维码
}

type Handler added in v0.1.0

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler added in v0.1.0

func NewHandler(handler wechat.NotifyHandler, svc service.Service) *Handler

func (*Handler) HandleWechatCallback added in v0.1.0

func (h *Handler) HandleWechatCallback(ctx *ginx.Context) (ginx.Result, error)

func (*Handler) MockWechatCallback added in v0.1.0

func (h *Handler) MockWechatCallback(ctx *ginx.Context, req payments.Transaction) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v0.1.0

func (h *Handler) PrivateRoutes(_ *gin.Engine)

func (*Handler) PublicRoutes added in v0.1.0

func (h *Handler) PublicRoutes(server *gin.Engine)

type PayReq added in v0.1.0

type PayReq struct {
	OrderSN  int64     `json:"order_sn"`
	Channels []Channel `json:"channels"`
}

type Payment

type Payment struct {
	SN          string
	OrderID     int64
	OrderSN     string
	TotalAmount int64
	Deadline    int64
	PaidAt      int64
	Status      int64
}

Jump to

Keyboard shortcuts

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