暂时屏蔽

This commit is contained in:
苏尹岚
2020-02-27 09:01:57 +08:00
parent 91fa24df7c
commit a096ab17f9

View File

@@ -1,14 +1,8 @@
package controllers package controllers
import ( import (
"fmt"
"net/http" "net/http"
"git.rosy.net.cn/baseapi/platformapi/wxpayapi"
"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" "github.com/astaxie/beego"
) )
@@ -18,23 +12,23 @@ type TongLianController struct {
func (c *TongLianController) Msg() { func (c *TongLianController) Msg() {
if c.Ctx.Input.Method() == http.MethodPost { if c.Ctx.Input.Method() == http.MethodPost {
msg, callbackResponse := api.TLpayAPI.GetCallbackMsg(c.Ctx.Request) // msg, callbackResponse := api.TLpayAPI.GetCallbackMsg(c.Ctx.Request)
globals.SugarLogger.Debugf("tonglianapi callback msg:%s, callbackResponse:%s, %t", utils.Format4Output(msg, true), utils.Format4Output(callbackResponse, true), callbackResponse == nil) // globals.SugarLogger.Debugf("tonglianapi 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 {
if msg.MsgType == wxpayapi.MsgTypeUnkown { // if msg.MsgType == wxpayapi.MsgTypeUnkown {
err = fmt.Errorf("未知的通联宝支付回调类型:%d", msg.MsgType) // err = fmt.Errorf("未知的通联宝支付回调类型:%d", msg.MsgType)
} else { // } else {
err = localjx.OnTLPayCallback(msg) // err = localjx.OnTLPayCallback(msg)
} // }
} // }
if callbackResponse == nil { // if callbackResponse == nil {
callbackResponse = wxpayapi.SuccessResponse // callbackResponse = wxpayapi.SuccessResponse
} else if err != nil { // } else if err != nil {
callbackResponse = wxpayapi.Err2CallbackResponse(err, "") // callbackResponse = wxpayapi.Err2CallbackResponse(err, "")
} // }
c.Data["json"] = callbackResponse // c.Data["json"] = callbackResponse
c.ServeJSON() // c.ServeJSON()
} else { } else {
c.Abort("404") c.Abort("404")
} }