Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthCodeToOpenId ¶
AuthCodeToOpenId 授权码查询openid.
Types ¶
type AuthCodeToOpenIdRequest ¶
type AuthCodeToOpenIdRequest struct {
XMLName struct{} `xml:"xml" json:"-"`
// 必选参数
AuthCode string `xml:"auth_code"` // 扫码支付授权码,设备读取用户微信中的条码或者二维码信息
// 可选参数
NonceStr string `xml:"nonce_str"` // 随机字符串,不长于32位。NOTE: 如果为空则系统会自动生成一个随机字符串。
SignType string `xml:"sign_type"` // 签名类型,默认为MD5,支持HMAC-SHA256和MD5。
}
type AuthCodeToOpenIdResponse ¶
type AuthCodeToOpenIdResponse struct {
XMLName struct{} `xml:"xml" json:"-"`
// 必选返回
OpenId string `xml:"openid"` // 用户在商户appid下的唯一标识
// 下面字段都是可选返回的(详细见微信支付文档), 为空值表示没有返回, 程序逻辑里需要判断
SubOpenId string `xml:"sub_openid"` // 用户在子商户appid下的唯一标识
}
func AuthCodeToOpenId2 ¶
func AuthCodeToOpenId2(clt *core.Client, req *AuthCodeToOpenIdRequest) (resp *AuthCodeToOpenIdResponse, err error)
AuthCodeToOpenId2 授权码查询openid.
type ShortURLRequest ¶
type ShortURLResponse ¶
type ShortURLResponse struct {
XMLName struct{} `xml:"xml" json:"-"`
// 必选返回
ShortURL string `xml:"short_url"` // 转换后的URL
}
func ShortURL2 ¶
func ShortURL2(clt *core.Client, req *ShortURLRequest) (resp *ShortURLResponse, err error)
ShortURL2 转换短链接.
Click to show internal directories.
Click to hide internal directories.