xpay

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config Config) *core.Client

NewClient create a wechat pay client

func NewEchoHandler

func NewEchoHandler(config Config, h Handler) echo.HandlerFunc

NewEchoHandler gen a echo handler

Types

type Config

type Config struct {
	MPAppID     string
	MchID       string
	APIKey      string
	CertPath    string `default:"/run/cert/apiclient_cert.pem"`
	CertKeyPath string `default:"/run/cert/apiclient_key.pem"`
}

Config is wechat pay config

type Handler

type Handler interface {
	ServeMsg(ctx *core.Context)
	ServeError(w http.ResponseWriter, r *http.Request, err error)
}

Handler will handle wechat pay callbacks

Jump to

Keyboard shortcuts

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