pay

package
v0.5.33 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Zlib Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AliAppCallback

func AliAppCallback(w http.ResponseWriter, r *http.Request) (*common.AliWebPayResult, error)

支付宝app支付回调

func Pay

func Pay(charge *common.Charge) (map[string]string, error)

Pay 用户下单支付接口

func PayToClient

func PayToClient(charge *common.Charge) (map[string]string, error)

PayToClient 付款给用户接口

func WxAppCallback

func WxAppCallback(w http.ResponseWriter, r *http.Request) (*common.WxPayResult, error)

func WxCallback

func WxCallback(w http.ResponseWriter, r *http.Request) (*common.WxPayResult, error)

WxCallback 微信支付

func WxWebCallback

func WxWebCallback(w http.ResponseWriter, r *http.Request) (*common.WxPayResult, error)

Types

type Config

type Config struct {
	AppID  string `json:"app_id" yaml:"app_id" xml:"app_id"`
	MchID  string `json:"mch_id" yaml:"mch_id" xml:"mch_id"`
	PubKey string `json:"pub_key" yaml:"pub_key" xml:"pub_key"`
	PriKey string `json:"pri_key" yaml:"pri_key" xml:"pri_key"`
	PayURL string `json:"pay_url" yaml:"pay_url" xml:"pay_url"`
	AppURL string `json:"app_cb_url" yaml:"app_cb_url" xml:"app_cb_url"`
	WebURL string `json:"web_cb_url" yaml:"web_cb_url" xml:"web_cb_url"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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