From ea3cd1b8335945fa22eb8538cbab3015ba7b504a Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 3 Dec 2019 12:12:03 +0800 Subject: [PATCH] fk --- controllers/wxpay_callback.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/controllers/wxpay_callback.go b/controllers/wxpay_callback.go index 5fe56ca86..2d6d89e7d 100644 --- a/controllers/wxpay_callback.go +++ b/controllers/wxpay_callback.go @@ -5,9 +5,7 @@ import ( "net/http" "git.rosy.net.cn/baseapi/platformapi/wxpay" - "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego" ) @@ -19,15 +17,12 @@ type WXPayController struct { func (c *WXPayController) Msg() { if c.Ctx.Input.Method() == http.MethodPost { msg, callbackResponse := api.WxpayAPI.GetCallbackMsg(c.Ctx.Request) - globals.SugarLogger.Debugf("wxpay callback msg:%s, callbackResponse:%s, %t", utils.Format4Output(msg, true), utils.Format4Output(callbackResponse, true), callbackResponse == nil) + // globals.SugarLogger.Debugf("wxpay callback msg:%s, callbackResponse:%s, %t", utils.Format4Output(msg, true), utils.Format4Output(callbackResponse, true), callbackResponse == nil) var err error if callbackResponse == nil { - globals.SugarLogger.Debugf("wxpay callback1 msg:%s", utils.Format4Output(msg, true)) - if msg.MsgType != wxpay.MsgTypeUnkown { - globals.SugarLogger.Debugf("wxpay callback2 msg:%s", utils.Format4Output(msg, true)) + if msg.MsgType == wxpay.MsgTypeUnkown { err = fmt.Errorf("未知的微信支付回调类型:%d", msg.MsgType) } else { - globals.SugarLogger.Debugf("wxpay callback3 msg:%s", utils.Format4Output(msg, true)) err = localjx.OnWxPayCallback(msg) } }