pay

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FlagOnlyCheck 仅验证密码
	FlagOnlyCheck = 1 << iota
	// FlagBalanceDiscount 余额抵扣
	FlagBalanceDiscount
	// FlagIntegralDiscount 积分抵扣
	FlagIntegralDiscount
	// FlagWalletPayment 钱包支付
	FlagWalletPayment
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

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

Gateway 支付网关

func NewGateway

func NewGateway(s storage.Interface) *Gateway

func (*Gateway) CheckAndPayment

func (g *Gateway) CheckAndPayment(userId int64, tradeNo string, TradePassword string) error

CheckAndPayment 模拟支付

func (*Gateway) CreatePostToken

func (g *Gateway) CreatePostToken(userId int64) string

CreatePostToken 生成支付网关提交令牌,5分钟内有效

func (*Gateway) GetData

func (g *Gateway) GetData() *wrapperData

func (*Gateway) Submit

func (g *Gateway) Submit(userId int64, data map[string]string) error

Submit 提交到网关

Jump to

Keyboard shortcuts

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