xunhupay

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Name = `xunhupay`

Variables

View Source
var (
	SandboxURL    = `https://api.diypc.com.cn` // 测试环境接口
	ProductionURL = `https://api.xunhupay.com` // 生产环境接口
	APIPay        = `/payment/do.html`
	APIQuery      = `/payment/query.html`
)

Functions

func GenerateHash

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

func New

func New() payment.Driver

func SetDefaults added in v0.2.2

func SetDefaults(a *config.Account)

Types

type XunHuPay

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

func (*XunHuPay) Client

func (a *XunHuPay) Client() *resty.Request

func (*XunHuPay) IsSupported added in v0.3.0

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

func (*XunHuPay) Pay

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

func (*XunHuPay) PayNotify

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

PayNotify 付款回调处理 documentation https://www.xunhupay.com/doc/api/pay.html

func (*XunHuPay) PayQuery

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

func (*XunHuPay) Refund

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

func (*XunHuPay) RefundNotify

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

RefundNotify 退款回调处理 documentation 不支持

func (*XunHuPay) RefundQuery

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

RefundQuery 退款查询

func (*XunHuPay) SetAccount

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

func (*XunHuPay) SetNotifyCallback

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

func (*XunHuPay) VerifySign

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

Jump to

Keyboard shortcuts

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