service/app/mix/controller/wxpay_callback.go

20 lines
466 B
Go
Raw Normal View History

2024-02-05 21:16:49 +08:00
package controller
import (
"github.com/gin-gonic/gin"
"service/bizcommon/util"
"service/library/logger"
"service/library/payclients/wxpaycli"
)
func WxpayCallback(ctx *gin.Context) {
notify, err := wxpaycli.GetDefaultWxpayClient().ParseNotify(ctx.Request)
if err != nil {
logger.Error("ParseNotify fail, req: %v, err: %v", util.ToJson(notify), err)
return
}
logger.Info("WxpayCallback, notify: %v", util.ToJson(notify))
ctx.String(200, "success")
}