package pay

import (
	"net/http"

	"qnc-server/app/main/api/internal/logic/pay"
	"qnc-server/app/main/api/internal/svc"
	"qnc-server/common/result"
)

func WechatPayCallbackHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := pay.NewWechatPayCallbackLogic(r.Context(), svcCtx)
		err := l.WechatPayCallback(w, r)
		result.HttpResult(r, w, nil, err)
	}
}
