From f2c7647ecff6747f2ac22eae0cfe9a091f6373ab Mon Sep 17 00:00:00 2001 From: Seefs <40468931+seefs001@users.noreply.github.com> Date: Fri, 22 May 2026 11:48:32 +0800 Subject: [PATCH] fix: enforce Waffo subscription compliance and product ID update (#5038) * fix: enforce Waffo subscription compliance and product ID updates * fix: hide Waffo Pancake settings in classic UI --- controller/subscription.go | 1 + controller/subscription_payment_waffo_pancake.go | 4 ++++ web/classic/src/components/settings/PaymentSetting.jsx | 8 -------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/controller/subscription.go b/controller/subscription.go index 4ce65249..7dc0d9ee 100644 --- a/controller/subscription.go +++ b/controller/subscription.go @@ -248,6 +248,7 @@ func AdminUpdateSubscriptionPlan(c *gin.Context) { "sort_order": req.Plan.SortOrder, "stripe_price_id": req.Plan.StripePriceId, "creem_product_id": req.Plan.CreemProductId, + "waffo_pancake_product_id": req.Plan.WaffoPancakeProductId, "max_purchase_per_user": req.Plan.MaxPurchasePerUser, "total_amount": req.Plan.TotalAmount, "upgrade_group": req.Plan.UpgradeGroup, diff --git a/controller/subscription_payment_waffo_pancake.go b/controller/subscription_payment_waffo_pancake.go index 5df3d4b6..d98f7f6b 100644 --- a/controller/subscription_payment_waffo_pancake.go +++ b/controller/subscription_payment_waffo_pancake.go @@ -21,6 +21,10 @@ type SubscriptionWaffoPancakePayRequest struct { } func SubscriptionRequestWaffoPancakePay(c *gin.Context) { + if !requirePaymentCompliance(c) { + return + } + var req SubscriptionWaffoPancakePayRequest if err := c.ShouldBindJSON(&req); err != nil || req.PlanId <= 0 { common.ApiErrorMsg(c, "参数错误") diff --git a/web/classic/src/components/settings/PaymentSetting.jsx b/web/classic/src/components/settings/PaymentSetting.jsx index bb9b2dfd..2fb3ab6b 100644 --- a/web/classic/src/components/settings/PaymentSetting.jsx +++ b/web/classic/src/components/settings/PaymentSetting.jsx @@ -24,7 +24,6 @@ import SettingsPaymentGateway from '../../pages/Setting/Payment/SettingsPaymentG import SettingsPaymentGatewayStripe from '../../pages/Setting/Payment/SettingsPaymentGatewayStripe'; import SettingsPaymentGatewayCreem from '../../pages/Setting/Payment/SettingsPaymentGatewayCreem'; import SettingsPaymentGatewayWaffo from '../../pages/Setting/Payment/SettingsPaymentGatewayWaffo'; -import SettingsPaymentGatewayWaffoPancake from '../../pages/Setting/Payment/SettingsPaymentGatewayWaffoPancake'; import { API, showError, showSuccess, toBoolean } from '../../helpers'; import { useTranslation } from 'react-i18next'; import RiskAcknowledgementModal from '../common/modals/RiskAcknowledgementModal'; @@ -305,13 +304,6 @@ const PaymentSetting = () => { hideSectionTitle /> - - -