政企超链接开始集成
This commit is contained in:
+4
-4
@@ -95,7 +95,7 @@ func getCompany(name, path string) Map {
|
||||
func Weixin(this *Context) *wechat.Wechat {
|
||||
if weixin == nil {
|
||||
cache1 := cache.Cache(WechatCache{this.CacheIns})
|
||||
config := wechat.Config{Cache: cache1, AppID: this.Config.GetString("wechatAppid"), AppSecret: this.Config.GetString("wechatAppscript")}
|
||||
config := wechat.Config{Cache: cache1, AppID: this.Config.GetString("wechatAppID"), AppSecret: this.Config.GetString("wechatAppSecret")}
|
||||
weixin = wechat.NewWechat(&config)
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ func Weixin(this *Context) *wechat.Wechat {
|
||||
//微信获取个人信息
|
||||
func WxPayClient(this *Context, sn string, money int64, openid string) Map {
|
||||
if wxpayClient == nil {
|
||||
wxpayClient = core.NewClient(this.Config.GetString("wechatAppid"), this.Config.GetString("wechatChid"), this.Config.GetString("wechatChkey"), nil)
|
||||
wxpayClient = core.NewClient(this.Config.GetString("wechatAppID"), this.Config.GetString("wechatChid"), this.Config.GetString("wechatChkey"), nil)
|
||||
}
|
||||
|
||||
res, err := pay.UnifiedOrder2(wxpayClient, &pay.UnifiedOrderRequest{
|
||||
@@ -141,13 +141,13 @@ func WxPayClient(this *Context, sn string, money int64, openid string) Map {
|
||||
return nil
|
||||
}
|
||||
wcpay := Map{
|
||||
"appId": this.Config.Get("wechatAppid"),
|
||||
"appId": this.Config.Get("wechatAppID"),
|
||||
"timeStamp": ObjToStr(time.Now().Unix()),
|
||||
"nonceStr": getSn(),
|
||||
"package": "prepay_id=" + res.PrepayId,
|
||||
"signType": "MD5",
|
||||
}
|
||||
wcpay["paySign"] = core.JsapiSign(this.Config.GetString("wechatAppid"), wcpay.GetString("timeStamp"), wcpay.GetString("nonceStr"), wcpay.GetString("package"), "MD5", this.Config.GetString("wechatChkey"))
|
||||
wcpay["paySign"] = core.JsapiSign(this.Config.GetString("wechatAppID"), wcpay.GetString("timeStamp"), wcpay.GetString("nonceStr"), wcpay.GetString("package"), "MD5", this.Config.GetString("wechatChkey"))
|
||||
|
||||
return wcpay
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user