feat: integrate unified payment and wallet refunds

This commit is contained in:
2026-08-02 23:24:32 +08:00
parent f0b8af0bc8
commit 82a2106a97
64 changed files with 1519 additions and 254 deletions

View File

@@ -0,0 +1,15 @@
package routers
import (
"fmt"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/payment"
"github.com/gin-gonic/gin"
)
// RegisterPaymentReturn 注册无 JWT 的渠道回调;安全性由渠道签名、商户、金额和支付单校验保证。
func RegisterPaymentReturn(serviceKey string, engine *gin.Engine) {
group := engine.Group(fmt.Sprintf("/%s/payment-return/v1", serviceKey))
group.POST("/alipay/notify", payment.AlipayNotify)
group.POST("/wechat/notify", payment.WechatNotify)
engine.POST(fmt.Sprintf("/%s/internal/v1/payment/close-expired", serviceKey), payment.CloseExpiredHandler)
}