Documentation ¶ Index ¶ func H5Pay(ctx context.Context, body *PayBody) (string, error) func Init(pay *config.WxPay) func JsApi(ctx context.Context, body *PayBody) (*wechat.JSAPIPayParams, error) func Native(ctx context.Context, body *PayBody) (string, error) type PayBody type WxPay Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func H5Pay ¶ added in v1.0.1 func H5Pay(ctx context.Context, body *PayBody) (string, error) func Init ¶ func Init(pay *config.WxPay) func JsApi ¶ added in v1.0.1 func JsApi(ctx context.Context, body *PayBody) (*wechat.JSAPIPayParams, error) func Native ¶ added in v1.0.1 func Native(ctx context.Context, body *PayBody) (string, error) Types ¶ type PayBody ¶ added in v1.0.1 type PayBody struct { Description string `json:"description"` OutTradeNo string `json:"out_trade_no"` TimeExpire string `json:"time_expire"` Amount float64 `json:"amount"` OpenId string `json:"openId"` ClientIp string `json:"clientIp"` } type WxPay ¶ type WxPay struct { Client *wechat.ClientV3 } Source Files ¶ View all Source files wxPay.go Click to show internal directories. Click to hide internal directories.