diff --git a/controller/subscription_payment_epay.go b/controller/subscription_payment_epay.go index 528ab5d2d..c45b39145 100644 --- a/controller/subscription_payment_epay.go +++ b/controller/subscription_payment_epay.go @@ -172,7 +172,7 @@ func SubscriptionEpayReturn(c *gin.Context) { if c.Request.Method == "POST" { // POST 请求:从 POST body 解析参数 if err := c.Request.ParseForm(); err != nil { - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=fail") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=fail") return } params = lo.Reduce(lo.Keys(c.Request.PostForm), func(r map[string]string, t string, i int) map[string]string { @@ -188,29 +188,29 @@ func SubscriptionEpayReturn(c *gin.Context) { } if len(params) == 0 { - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=fail") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=fail") return } client := GetEpayClient() if client == nil { - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=fail") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=fail") return } verifyInfo, err := client.Verify(params) if err != nil || !verifyInfo.VerifyStatus { - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=fail") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=fail") return } if verifyInfo.TradeStatus == epay.StatusTradeSuccess { LockOrder(verifyInfo.ServiceTradeNo) defer UnlockOrder(verifyInfo.ServiceTradeNo) if err := model.CompleteSubscriptionOrder(verifyInfo.ServiceTradeNo, common.GetJsonString(verifyInfo)); err != nil { - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=fail") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=fail") return } - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=success") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=success") return } - c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/subscription?pay=pending") + c.Redirect(http.StatusFound, system_setting.ServerAddress+"/console/topup?pay=pending") }