feat(payment): 增加支付配置测试支付与全链路报文

This commit is contained in:
2026-11-20 14:51:17 +08:00
parent b539e3a42f
commit 8fec2fa5a2
19 changed files with 2353 additions and 5 deletions
+5
View File
@@ -553,6 +553,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
api.POST("/payments/lakala/notify", paymentHandler.LakalaNotify)
api.POST("/payments/shuncheng/notify", paymentHandler.ShunchengNotify)
api.POST("/payments/saobei/notify", paymentHandler.SaobeiNotify)
api.POST("/payments/config-test/:provider/notify/:token", paymentHandler.ConfigTestNotify)
openRoutes := api.Group("/open")
{
@@ -1005,6 +1006,10 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
adminRoutes.POST("/payment-configs", requirePerm("payment_config:create"), paymentConfigHandler.Create)
adminRoutes.PUT("/payment-configs/:id", requirePerm("payment_config:update"), paymentConfigHandler.Update)
adminRoutes.DELETE("/payment-configs/:id", requirePerm("payment_config:delete"), paymentConfigHandler.Delete)
adminRoutes.POST("/payment-configs/:id/test-orders", requirePerm("payment_config:list"), paymentHandler.StartConfigTestPayment)
adminRoutes.GET("/payment-config-test-orders", requirePerm("payment_config:list"), paymentHandler.AdminListConfigTestPayments)
adminRoutes.GET("/payment-config-test-orders/:id", requirePerm("payment_config:list"), paymentHandler.AdminGetConfigTestPayment)
adminRoutes.POST("/payment-config-test-orders/:id/refresh", requirePerm("payment_config:list"), paymentHandler.AdminRefreshConfigTestPayment)
}
adminRoutes.GET("/system-configs", requirePerm("system_config:view"), systemConfigHandler.List)