fix
This commit is contained in:
17
app/main/api/internal/handler/pay/easypaycallbackhandler.go
Normal file
17
app/main/api/internal/handler/pay/easypaycallbackhandler.go
Normal 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)
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user