This commit is contained in:
邹宗楠
2022-06-02 10:13:04 +08:00
parent 632b324bbc
commit cbbb9bfd89
3 changed files with 6 additions and 43 deletions

View File

@@ -38,19 +38,21 @@ func MsgFail() *TicktockRes {
}
}
func (c *TicTocController) Msg() {
func (c *TicTocController) TtMsg() {
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 {
c.Data["json"] = MsgFail()
c.ServeJSON()
globals.SugarLogger.Debugf("============err:%s", err)
return
}
err = localjx.OnTTPayCallback(call, refund, payType)
if err != nil {
c.Data["json"] = MsgFail()
c.ServeJSON()
globals.SugarLogger.Debugf("============err:%s", err)
return
}
c.Data["json"] = MsgSuccess()