48 lines
2.2 KiB
Go
48 lines
2.2 KiB
Go
package routers
|
|
|
|
import (
|
|
"gateway/internal/controllers/gateway"
|
|
|
|
"gateway/internal/otelTrace"
|
|
"gateway/internal/service/supplier/third_party"
|
|
|
|
"github.com/beego/beego/v2/server/web"
|
|
beecontext "github.com/beego/beego/v2/server/web/context"
|
|
)
|
|
|
|
func init() {
|
|
web.InsertFilterChain("*", func(next web.FilterFunc) web.FilterFunc {
|
|
return func(ctx *beecontext.Context) {
|
|
otelTrace.Middleware(ctx, next)
|
|
}
|
|
})
|
|
// 网关处理
|
|
web.Router("/gateway/queryAccountInfo/:channel", &gateway.ScanController{}, "*:QueryAccountInfo")
|
|
//提交订单接口
|
|
web.Router("/gateway/scan", &gateway.ScanController{}, "*:Scan")
|
|
web.Router("/gateway/getAllowedMM", &gateway.ScanController{}, "*:GetAllowedMM")
|
|
web.Router("/gateway/createOrder", &gateway.ScanController{}, "*:CreateOrder")
|
|
// 代付相关的接口
|
|
//web.Router("/gateway/payfor", &gateway.PayForGateway{}, "*:PayFor")
|
|
//web.Router("/gateway/payfor/query", &gateway.PayForGateway{}, "*:PayForQuery")
|
|
web.Router("/gateway/balance", &gateway.PayForGateway{}, "*:Balance")
|
|
//web.Router("/gateway/supplier/payfor/query", &gateway.PayForGateway{}, "*:QuerySupplierPayForResult")
|
|
//web.Router("/solve/payfor/result", &gateway.PayForGateway{}, "*:SolvePayForResult")
|
|
// 接收回调
|
|
web.Router("/gateway/supplier/order/query", &gateway.OrderController{}, "*:OrderQuery")
|
|
web.Router("/gateway/update/order", &gateway.OrderController{}, "*:OrderUpdate")
|
|
//查单接口
|
|
web.Router("/gateway/merchant/query", &gateway.OrderController{}, "*:MerchantQuery")
|
|
|
|
web.Router("/mfcard/notifyV2", &third_party.MFCardV2Impl{}, "*:PayNotify")
|
|
web.Router("/appleCard/notify", &third_party.AppleCardImpl{}, "*:PayNotify")
|
|
web.Router("/appleSharkCard/notify", &third_party.AppleCardSharkImpl{}, "*:PayNotify")
|
|
web.Router("/tMallGame/notify", &third_party.TMAllGameImpl{}, "*:PayNotify")
|
|
web.Router("/jdCard/notify", &third_party.JDCardImpl{}, "*:PayNotify")
|
|
web.Router("/walMart/notify", &third_party.WalMartImpl{}, "*:PayNotify")
|
|
web.Router("/walMartSelf/notify", &third_party.WalmartSelfImpl{}, "*:PayNotify")
|
|
web.Router("/sixFat/notify", &third_party.FatSixImpl{}, "*:PayNotify")
|
|
web.Router("/selfThird/notify", &third_party.SelfThirdImpl{}, "*:PayNotify")
|
|
web.Router("/starSilence/notify", &third_party.StarSilenceImpl{}, "*:PayNotify")
|
|
}
|