This commit is contained in:
2025-12-31 16:54:17 +08:00
parent 4a48add783
commit a30d77845d
12 changed files with 688 additions and 20 deletions

View File

@@ -0,0 +1,17 @@
package pay
import (
"net/http"
"jnc-server/app/main/api/internal/logic/pay"
"jnc-server/app/main/api/internal/svc"
"jnc-server/common/result"
)
func EasyPayCallbackHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := pay.NewEasyPayCallbackLogic(r.Context(), svcCtx)
err := l.EasyPayCallback(w, r)
result.HttpResult(r, w, nil, err)
}
}

View File

@@ -771,6 +771,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/pay/alipay/callback",
Handler: pay.AlipayCallbackHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/pay/easypay/callback",
Handler: pay.EasyPayCallbackHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/pay/wechat/callback",