mxsubscribe

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTENT_TYPE_JSON = "application/json;charset=utf-8"
)
View Source
const (
	//发送订阅消息
	WXSUBSCRIBE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send"
)

Variables

View Source
var (
	WXSUB_ERROR               = errors.New("请求失败")
	WXSUB_REQ_PARAMT_ERROR    = errors.New("缺少参数")
	WXSUB_JSON_MARSHA_ERROR   = errors.New("JSON生成错误")
	WXSUB_JSON_UNMARSHA_ERROR = errors.New("JSON解析错误")
	WXSUB_XML_MARSHA_ERROR    = errors.New("XML生成错误")
	WXSUB_XML_UNMARSHA_ERROR  = errors.New("XML解析错误")
	WXSUB_SIGN_CAL_ERROR      = errors.New("签名计算失败")
	WXSUB_SIGN_VERIFY_ERROR   = errors.New("签名验证失败")
)

请求参数错误

Functions

This section is empty.

Types

type WxSub

type WxSub struct {
	HttpClient         *http.Client
	HttpClientWithCert *http.Client
}

微信订阅消息

func New

func New() (wx *WxSub)

创建微信支付对象

func (*WxSub) SendSubscribeMessage

func (wx *WxSub) SendSubscribeMessage(accessToken string, toUserOpenId string, templateId string,
	page string, data map[string]interface{}) (errcode int, errmsg string, err error)

发送订阅消息

Jump to

Keyboard shortcuts

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