init: init refactor
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// Code scaffolded by goctl. Safe to edit.
|
||||
// goctl 1.10.1
|
||||
|
||||
package callback
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"sundynix-micro-go/app/plant/api/internal/logic/callback"
|
||||
"sundynix-micro-go/app/plant/api/internal/svc"
|
||||
"sundynix-micro-go/common/response"
|
||||
)
|
||||
|
||||
// 微信支付回调
|
||||
func WechatPayCallbackHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := callback.NewWechatPayCallbackLogic(r.Context(), svcCtx)
|
||||
err := l.WechatPayCallback()
|
||||
if err != nil {
|
||||
response.Fail(w, err.Error())
|
||||
} else {
|
||||
response.Ok(w)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user