24 lines
466 B
Go
24 lines
466 B
Go
package controller
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"hepa-calc-api/api/responses"
|
|
"hepa-calc-api/extend/weChat"
|
|
"hepa-calc-api/utils"
|
|
)
|
|
|
|
// CallBack 回调
|
|
type CallBack struct{}
|
|
|
|
// WxJsapiPay 微信支付回调-jsapi
|
|
func (r *CallBack) WxJsapiPay(c *gin.Context) {
|
|
notifyReq, err := weChat.ParseNotify(c)
|
|
if err != nil {
|
|
responses.FailWithMessage(err.Error(), c)
|
|
return
|
|
}
|
|
|
|
// 记录日志
|
|
utils.LogJsonErr("微信支付回调-jsapi", notifyReq)
|
|
}
|