feat: integrate unified payment and wallet refunds
This commit is contained in:
15
backend/api/internal/routers/payment.go
Normal file
15
backend/api/internal/routers/payment.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user