xpay

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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