fix(subscription): finalize payments, log billing, and clean up dead code

Complete subscription orders by creating a matching top-up record and writing billing logs
Add Epay return handler to verify and finalize browser callbacks
Require Stripe/Creem webhook configuration before starting subscription payments
Show subscription purchases in topup history with clearer labels/methods
Remove unused subscription helper, legacy Creem webhook struct, and unused topup fields
Simplify subscription self API payload to active/all lists only
This commit is contained in:
t0ng7u
2026-01-30 23:40:01 +08:00
parent a60783e99f
commit 697cbbf752
9 changed files with 123 additions and 52 deletions

View File

@@ -149,6 +149,7 @@ func SetApiRouter(router *gin.Engine) {
// Subscription payment callbacks (no auth)
apiRouter.GET("/subscription/epay/notify", controller.SubscriptionEpayNotify)
apiRouter.GET("/subscription/epay/return", controller.SubscriptionEpayReturn)
optionRoute := apiRouter.Group("/option")
optionRoute.Use(middleware.RootAuth())
{