mockpay

package
v0.7.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Name = `mockpay`

Variables

This section is empty.

Functions

func DeleteCachedKey

func DeleteCachedKey(key string)

func GenerateHash

func GenerateHash(data url.Values, secret string) string

func GetAllCachedKeys

func GetAllCachedKeys() []string

func New

func New() payment.Driver

Types

type GatewayPayData

type GatewayPayData struct {
	TradeNo     string
	Currency    string
	TotalAmount float64
	Config      config.Pay
}

type GatewayRefundData

type GatewayRefundData struct {
	RefundNo    string
	TotalAmount float64
	RefundFee   float64
	Currency    string
	Config      config.Refund
}

type ManualNotice

type ManualNotice interface {
	SubmitPayNotice(tradeNo string) error
	SubmitRefundNotice(refundNo string) error
}

type Mockpay

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

func (*Mockpay) IsSupported

func (a *Mockpay) IsSupported(s config.Support) bool

func (*Mockpay) Pay

func (a *Mockpay) Pay(ctx echo.Context, cfg *config.Pay) (*config.PayResponse, error)

func (*Mockpay) PayNotify

func (a *Mockpay) PayNotify(ctx echo.Context) error

func (*Mockpay) PayQuery

func (a *Mockpay) PayQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)

func (*Mockpay) Refund

func (a *Mockpay) Refund(ctx echo.Context, cfg *config.Refund) (*config.Result, error)

func (*Mockpay) RefundNotify

func (a *Mockpay) RefundNotify(ctx echo.Context) error

func (*Mockpay) RefundQuery

func (a *Mockpay) RefundQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)

func (*Mockpay) SetAccount

func (a *Mockpay) SetAccount(account *config.Account) payment.Driver

func (*Mockpay) SetNotifyCallback

func (a *Mockpay) SetNotifyCallback(callback func(echo.Context) error) payment.Driver

func (*Mockpay) SubmitPayNotice

func (a *Mockpay) SubmitPayNotice(tradeNo string) error

func (*Mockpay) SubmitRefundNotice

func (a *Mockpay) SubmitRefundNotice(refundNo string) error

func (*Mockpay) VerifySign

func (a *Mockpay) VerifySign(ctx echo.Context) error

Jump to

Keyboard shortcuts

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