|
123456789101112131415161718192021222324252627282930313233 |
- package hdl
-
- import (
- "applet/app/customer/md"
- "applet/app/customer/svc"
- "applet/app/e"
- "fmt"
- "github.com/gin-gonic/gin"
- )
-
- func AlipayJsApiCallBack(c *gin.Context) {
- data := svc.CheckAllCallbackParams(c)
- if data == nil {
- e.OutErr(c, e.ERR_INVALID_ARGS)
- return
- }
- c.Set("callback", data)
- args, ok := data.(*md.AliPayCallback)
- if !ok {
- fmt.Println("反射ok失败")
- e.OutErr(c, e.ERR_INVALID_ARGS, "反射失败")
- return
- }
-
- _, err := svc.DealCentralKitchenForSchoolOrderCallBack(args.OutTradeNo, args.TradeStatus)
- if err != nil {
- e.OutErr(c, e.ERR, err.Error())
- return
- }
- //TODO::此处需要直接输出 success,避免支付宝重复回调
- //c.Header("Content-Type", "text/html; charset=utf-8")
- c.String(200, "success")
- }
|