This commit is contained in:
2024-07-25 18:00:42 +08:00
parent c21b47fc73
commit 5dd3c44917
5 changed files with 20 additions and 12 deletions
+6 -3
View File
@@ -10,8 +10,8 @@ import (
// CallBack 回调
type CallBack struct{}
// WxJsapiPay 微信支付回调-jsapi
func (r *CallBack) WxJsapiPay(c *gin.Context) {
// WxPaySingle 微信支付回调-单项
func (r *CallBack) WxPaySingle(c *gin.Context) {
notifyReq, err := weChat.ParseNotify(c)
if err != nil {
responses.FailWithMessage(err.Error(), c)
@@ -19,5 +19,8 @@ func (r *CallBack) WxJsapiPay(c *gin.Context) {
}
// 记录日志
utils.LogJsonErr("微信支付回调-jsapi", notifyReq)
utils.LogJsonErr("微信支付回调-单项", notifyReq)
// 查询订单
}
+2 -1
View File
@@ -98,7 +98,8 @@ func publicRouter(r *gin.Engine, api controller.Api) {
// 微信支付回调
wxpayGroup := callbackGroup.Group("/wxpay")
{
wxpayGroup.POST("/jsapi", api.CallBack.WxJsapiPay)
// 单项
wxpayGroup.POST("/single", api.CallBack.WxPaySingle)
}
}
}