package pay

import (
	"net/http"

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

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