wxmini

package module
v0.0.0-...-4857a32 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 7 Imported by: 0

README

wxmini-sdk

微信小程序SDK

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppProgram

type AppProgram struct {
	AppID  string `json:"appid"`  // 微信APPID
	Secret string `json:"secret"` // 微信Secret
	MchID  string `json:"mchid"`  // 商户号
	PayKey string `json:"paykey"` // 支付密钥
}

小程序应用实体

func NewAppProgram

func NewAppProgram(appId, secret, mchId, payKey string) *AppProgram

创建新的对象

func (*AppProgram) GetPayBackData

func (this *AppProgram) GetPayBackData(xmlData []byte) (*pay.WaxPayNotifyReq, error)

解析微信支付回调数据

func (*AppProgram) Login

func (this *AppProgram) Login(code, encryptedData, iv string) (wxUserInfo *login.WechatEncryptedData, err error)

登录

func (*AppProgram) Pay

func (this *AppProgram) Pay(openId string, money int, callbackURL, tradeNo, tradeInfo string) (results *pay.WaxPayRet, err error)

支付

func (*AppProgram) SendSubscribe

func (this *AppProgram) SendSubscribe(openId, templateId, jumpPage string, data map[string]interface{}) error

发布订阅消息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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