23 lines
458 B
Go
23 lines
458 B
Go
package pay
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"qnc-server/app/main/api/internal/logic/pay"
|
|
"qnc-server/app/main/api/internal/svc"
|
|
)
|
|
|
|
func XpayPushHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
l := pay.NewXpayPushLogic(svcCtx)
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
switch r.Method {
|
|
case http.MethodGet:
|
|
l.HandleGET(w, r)
|
|
case http.MethodPost:
|
|
l.HandlePOST(w, r)
|
|
default:
|
|
w.WriteHeader(http.StatusMethodNotAllowed)
|
|
}
|
|
}
|
|
}
|