修改抖音回调

This commit is contained in:
邹宗楠
2022-06-06 15:06:24 +08:00
parent 372f291602
commit 55d97c5ef6

View File

@@ -40,7 +40,7 @@ func MsgFail() *TicktockRes {
func (c *TicTocController) TiktokMsg() {
globals.SugarLogger.Debugf("============err:%s", "抖音支付/退款回调")
if c.Ctx.Input.Method() == http.MethodPost {
//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{
@@ -58,9 +58,9 @@ func (c *TicTocController) TiktokMsg() {
}
c.Data["json"] = MsgSuccess()
c.ServeJSON()
} else {
c.Abort("404")
}
//} else {
// c.Abort("404")
//}
}
func getPayInfo(ctx *context.Context) *http.Request {