Browse Source

Merge pull request #2124 from feitianbubu/pr/fix-topup-link

fix: correct topUp link
Seefs 1 month ago
parent
commit
8f862152e8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      controller/topup_stripe.go
  2. 1 1
      service/quota.go

+ 1 - 1
controller/topup_stripe.go

@@ -220,7 +220,7 @@ func genStripeLink(referenceId string, customerId string, email string, amount i
 	params := &stripe.CheckoutSessionParams{
 		ClientReferenceID: stripe.String(referenceId),
 		SuccessURL:        stripe.String(system_setting.ServerAddress + "/console/log"),
-		CancelURL:         stripe.String(system_setting.ServerAddress + "/topup"),
+		CancelURL:         stripe.String(system_setting.ServerAddress + "/console/topup"),
 		LineItems: []*stripe.CheckoutSessionLineItemParams{
 			{
 				Price:    stripe.String(setting.StripePriceId),

+ 1 - 1
service/quota.go

@@ -535,7 +535,7 @@ func checkAndSendQuotaNotify(relayInfo *relaycommon.RelayInfo, quota int, preCon
 		}
 		if quotaTooLow {
 			prompt := "您的额度即将用尽"
-			topUpLink := fmt.Sprintf("%s/topup", system_setting.ServerAddress)
+			topUpLink := fmt.Sprintf("%s/console/topup", system_setting.ServerAddress)
 
 			// 根据通知方式生成不同的内容格式
 			var content string