redpacket

package
v2.1.6-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	MchBillno   string // 商户订单号
	SendName    string // 商户名称
	ReOpenID    string
	TotalAmount int
	TotalNum    int
	Wishing     string
	ClientIP    string
	ActName     string
	Remark      string

	RootCa string // ca证书
}

Params 调用参数

type Redpacket

type Redpacket struct {
	*config.Config
}

Redpacket struct extends context

func NewRedpacket

func NewRedpacket(cfg *config.Config) *Redpacket

NewRedpacket return an instance of Redpacket package

func (*Redpacket) SendRedpacket

func (redpacket *Redpacket) SendRedpacket(p *Params) (rsp *Response, err error)

SendRedpacket 发放红包

type Response

type Response struct {
	ReturnCode  string `xml:"return_code"`
	ReturnMsg   string `xml:"return_msg"`
	ResultCode  string `xml:"result_code,omitempty"`
	ErrCode     string `xml:"err_code,omitempty"`
	ErrCodeDes  string `xml:"err_code_des,omitempty"`
	MchBillno   string `xml:"mch_billno,omitempty"`
	MchID       string `xml:"mch_id,omitempty"`
	Wxappid     string `xml:"wxappid"`
	ReOpenID    string `xml:"re_openid"`
	TotalAmount int    `xml:"total_amount"`
	SendListid  string `xml:"send_listid"`
}

Response 接口返回

Jump to

Keyboard shortcuts

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