Skip to content

Commit

Permalink
add webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
bozhang75 committed Jul 29, 2022
1 parent dee9c0f commit 2080aaf
Show file tree
Hide file tree
Showing 3 changed files with 373 additions and 12 deletions.
24 changes: 12 additions & 12 deletions wechat_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ type Wechat struct {

//用户wechat配置
type Config struct {
AppID string //开发者ID(AppID)
AppSecret string //开发者PWD AppSecret
Token string //令牌(Token)
EncodingAESKey string //消息加解密密钥 EncodingAESKey
PayMchId string //支付 - 商户 ID
PayNotifyUrl string //支付 - 接受微信支付结果通知的接口地址
PayKey string //支付 - 商户后台设置的支付 key
Cache cache.Cache //缓存
ThirdAccessToken bool //是否共享其它accessToken,非appID获取 默认false
ProxyUrl string //缓存配置文件
AppID string //开发者ID(AppID)
AppSecret string //开发者PWD AppSecret
Token string //令牌(Token)
EncodingAESKey string //消息加解密密钥 EncodingAESKey
PayMchId string //支付 - 商户 ID
PayNotifyUrl string //支付 - 接受微信支付结果通知的接口地址
PayKey string //支付 - 商户后台设置的支付 key
Cache cache.Cache //缓存
ThirdAccessToken bool //是否共享其它accessToken,非appID获取 默认false
ProxyUrl string //缓存配置文件
}

//实例化wechat
Expand Down Expand Up @@ -77,7 +77,7 @@ func (wc *Wechat) GetResponseServer(req *http.Request) *server.Server {
func (wc *Wechat) GetAccessToken() string {
accessToken, err := wc.Context.GetAccessToken()
if err != nil {
fmt.Printf("mp GetAccessToken Err:%+v",err)
fmt.Printf("mp GetAccessToken Err:%+v", err)
}
return accessToken
}
Expand Down Expand Up @@ -129,4 +129,4 @@ func (wc *Wechat) GetAccount() *account.Account {
//账户管理
func (wc *Wechat) GetJSSDK() *jssdk.JSAPISDK {
return jssdk.NewJSSDK(wc.Context)
}
}
Loading

0 comments on commit 2080aaf

Please sign in to comment.