1
This commit is contained in:
@@ -39,25 +39,22 @@ func MsgFail() *TicktockRes {
|
||||
}
|
||||
|
||||
func (c *TicTocController) TiktokMsg() {
|
||||
globals.SugarLogger.Debugf("============err:%s", "抖音支付/退款回调")
|
||||
//if c.Ctx.Input.Method() == http.MethodPost {
|
||||
call, refund, payType, err := api.TiktokApi.GetCallbackMsg(getPayInfo(c.Ctx))
|
||||
globals.SugarLogger.Debugf("tictok callback callbackResponse:%s", utils.Format4Output(call, true))
|
||||
if err != nil || call == nil{
|
||||
c.Data["json"] = MsgFail()
|
||||
c.ServeJSON()
|
||||
globals.SugarLogger.Debugf("============err:%s", err)
|
||||
return
|
||||
}
|
||||
|
||||
if err = localjx.OnTTPayCallback(call, refund, payType); err != nil {
|
||||
c.Data["json"] = MsgFail()
|
||||
c.ServeJSON()
|
||||
globals.SugarLogger.Debugf("============err:%s", err)
|
||||
return
|
||||
}
|
||||
c.Data["json"] = MsgSuccess()
|
||||
call, refund, payType, err := api.TiktokApi.GetCallbackMsg(getPayInfo(c.Ctx))
|
||||
globals.SugarLogger.Debugf("tictok callback callbackResponse:%s", utils.Format4Output(call, true))
|
||||
if err != nil || call == nil {
|
||||
c.Data["json"] = MsgFail()
|
||||
c.ServeJSON()
|
||||
return
|
||||
}
|
||||
|
||||
if err = localjx.OnTTPayCallback(call, refund, payType); err != nil {
|
||||
c.Data["json"] = MsgFail()
|
||||
c.ServeJSON()
|
||||
return
|
||||
}
|
||||
c.Data["json"] = MsgSuccess()
|
||||
c.ServeJSON()
|
||||
//} else {
|
||||
// c.Abort("404")
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user