|
@@ -4,13 +4,14 @@ import (
|
|
"config"
|
|
"config"
|
|
"entity"
|
|
"entity"
|
|
"fmt"
|
|
"fmt"
|
|
- "github.com/go-xweb/xweb"
|
|
|
|
"log"
|
|
"log"
|
|
"net/url"
|
|
"net/url"
|
|
"pay"
|
|
"pay"
|
|
qutil "qfw/util"
|
|
qutil "qfw/util"
|
|
"qfw/util/redis"
|
|
"qfw/util/redis"
|
|
"strings"
|
|
"strings"
|
|
|
|
+
|
|
|
|
+ "github.com/go-xweb/xweb"
|
|
)
|
|
)
|
|
|
|
|
|
type PayCallBackAction struct {
|
|
type PayCallBackAction struct {
|
|
@@ -79,7 +80,7 @@ func (p *PayCallBackAction) WxPayCallback() {
|
|
}
|
|
}
|
|
|
|
|
|
ok := func() bool {
|
|
ok := func() bool {
|
|
- if ret["return_code"] != "SUCCESS" || !(ret["appid"] == pay.WxStruct.Appid ||ret["appid"] == pay.WxStruct.Appid_app)|| ret["mch_id"] != pay.WxStruct.Mchid {
|
|
|
|
|
|
+ if ret["return_code"] != "SUCCESS" || !(ret["appid"] == pay.WxStruct.Appid || ret["appid"] == pay.WxStruct.Appid_app) || ret["mch_id"] != pay.WxStruct.Mchid {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
if thisParam.Openid != "" {
|
|
if thisParam.Openid != "" {
|
|
@@ -88,7 +89,7 @@ func (p *PayCallBackAction) WxPayCallback() {
|
|
if ret["sign"] != qutil.CreateWxSign(fmt.Sprintf("&key=%s", pay.WxStruct.Key), ret) {
|
|
if ret["sign"] != qutil.CreateWxSign(fmt.Sprintf("&key=%s", pay.WxStruct.Key), ret) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- update, insert := false, false;
|
|
|
|
|
|
+ update, insert := false, false
|
|
if strings.HasPrefix(thisParam.OutTradeno, pay.WX_REWARD_JSAPI) { //打赏
|
|
if strings.HasPrefix(thisParam.OutTradeno, pay.WX_REWARD_JSAPI) { //打赏
|
|
if update = entity.JyReWardStruct.PayCallBack(thisParam); !update {
|
|
if update = entity.JyReWardStruct.PayCallBack(thisParam); !update {
|
|
log.Printf("微信打赏更新执行出错 %+v\n", thisParam)
|
|
log.Printf("微信打赏更新执行出错 %+v\n", thisParam)
|
|
@@ -102,7 +103,7 @@ func (p *PayCallBackAction) WxPayCallback() {
|
|
log.Printf("微信数据报告更新执行出错 %+v\n", thisParam)
|
|
log.Printf("微信数据报告更新执行出错 %+v\n", thisParam)
|
|
}
|
|
}
|
|
} else if strings.HasPrefix(thisParam.OutTradeno, pay.WX_SUBVIP_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_SUBVIP_JSAPI) { //vip订阅
|
|
} else if strings.HasPrefix(thisParam.OutTradeno, pay.WX_SUBVIP_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_SUBVIP_JSAPI) { //vip订阅
|
|
- if update=entity.JyVipSubStruct.PayCallBack(thisParam);!update{
|
|
|
|
|
|
+ if update = entity.JyVipSubStruct.PayCallBack(thisParam); !update {
|
|
log.Printf("微信vip订阅更新执行出错 %+v\n", thisParam)
|
|
log.Printf("微信vip订阅更新执行出错 %+v\n", thisParam)
|
|
}
|
|
}
|
|
}
|
|
}
|