22 lines
513 B
Go
22 lines
513 B
Go
package api
|
|
|
|
import (
|
|
"dd_fiber_api/internal/payment"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
// SetupPaymentRoutes 支付接口
|
|
func SetupPaymentRoutes(router fiber.Router, paymentHandler *payment.Handler) {
|
|
if paymentHandler == nil {
|
|
return
|
|
}
|
|
|
|
payment := router.Group("/payment")
|
|
|
|
// 微信支付V3
|
|
wechat := payment.Group("/wechat/v3")
|
|
wechat.Post("", paymentHandler.CreateWechatPayV3).Name("创建支付订单")
|
|
wechat.Post("/notify", paymentHandler.HandleWechatPayV3Notify).Name("支付通知回调")
|
|
}
|