fk
This commit is contained in:
@@ -19,12 +19,15 @@ type WXPayController struct {
|
|||||||
func (c *WXPayController) Msg() {
|
func (c *WXPayController) Msg() {
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
msg, callbackResponse := api.WxpayAPI.GetCallbackMsg(c.Ctx.Request)
|
msg, callbackResponse := api.WxpayAPI.GetCallbackMsg(c.Ctx.Request)
|
||||||
globals.SugarLogger.Debugf("wxpay callback msg:%s, callbackResponse:%s", utils.Format4Output(msg, true), utils.Format4Output(callbackResponse, true))
|
globals.SugarLogger.Debugf("wxpay callback msg:%s, callbackResponse:%s, %t", utils.Format4Output(msg, true), utils.Format4Output(callbackResponse, true), callbackResponse == nil)
|
||||||
var err error
|
var err error
|
||||||
if callbackResponse == nil {
|
if callbackResponse == nil {
|
||||||
|
globals.SugarLogger.Debugf("wxpay callback1 msg:%s", utils.Format4Output(msg, true))
|
||||||
if msg.MsgType != wxpay.MsgTypeUnkown {
|
if msg.MsgType != wxpay.MsgTypeUnkown {
|
||||||
|
globals.SugarLogger.Debugf("wxpay callback2 msg:%s", utils.Format4Output(msg, true))
|
||||||
err = fmt.Errorf("未知的微信支付回调类型:%d", msg.MsgType)
|
err = fmt.Errorf("未知的微信支付回调类型:%d", msg.MsgType)
|
||||||
} else {
|
} else {
|
||||||
|
globals.SugarLogger.Debugf("wxpay callback3 msg:%s", utils.Format4Output(msg, true))
|
||||||
err = localjx.OnWxPayCallback(msg)
|
err = localjx.OnWxPayCallback(msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user