wechat

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

func GetAccessToken added in v0.1.2

func GetAccessToken(appID string, appSecret string) (string, error)

func Init

func Init(baseUrl string, timeoutSec time.Duration)

func MiniQr

func MiniQr(wechatAppID string, secret string, path string) (string, error)

func SendTemplateSubscribeMessage

func SendTemplateSubscribeMessage(wechatAppID string, appSecret string, toUser string, templateID string,
	data map[string]interface{}) error

Types

type CreateUnifiedOrderResult

type CreateUnifiedOrderResult struct {
	TimeStamp string `json:"timeStamp"`
	Nonce     string `json:"nonce"`
	Package   string `json:"package"`
	SignType  string `json:"signType"`
	PaySign   string `json:"paySign"`
}

type GetAccessTokenResponse added in v0.1.2

type GetAccessTokenResponse struct {
	AccessToken string `json:"access_token"`
	// contains filtered or unexported fields
}

type SendTemplateSubscribeMessageRequest

type SendTemplateSubscribeMessageRequest struct {
	AppID      string                 `json:"appId" binding:"required"`
	AppSecret  string                 `json:"appSecret" binding:"required"`
	ToUser     string                 `json:"touser" binding:"required"`
	TemplateID string                 `json:"templateId" binding:"required"`
	Data       map[string]interface{} `json:"data" binding:"required"`
}

type UnifiedOrderRequest

type UnifiedOrderRequest struct {
	OpenID     string `json:"openId"`
	AppID      string `json:"appId"`
	MchID      string `json:"mchId"`
	MchKey     string `json:"mchKey"`
	Body       string `json:"body"`
	OutTradeNo string `json:"outTradeNo"`
	TotalFee   int    `json:"totalFee"`
	TerminalIP string `json:"terminalIP"`
	NotifyUrl  string `json:"notifyUrl"`
}

type UnifiedOrderResponse

type UnifiedOrderResponse struct {
	TimeStamp string `json:"timeStamp"`
	Nonce     string `json:"nonce"`
	Package   string `json:"package"`
	SignType  string `json:"signType"`
	PaySign   string `json:"paySign"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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