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
This commit is contained in:
parent
19f1821fc8
commit
f2c7647ecf
@ -248,6 +248,7 @@ func AdminUpdateSubscriptionPlan(c *gin.Context) {
|
|||||||
"sort_order": req.Plan.SortOrder,
|
"sort_order": req.Plan.SortOrder,
|
||||||
"stripe_price_id": req.Plan.StripePriceId,
|
"stripe_price_id": req.Plan.StripePriceId,
|
||||||
"creem_product_id": req.Plan.CreemProductId,
|
"creem_product_id": req.Plan.CreemProductId,
|
||||||
|
"waffo_pancake_product_id": req.Plan.WaffoPancakeProductId,
|
||||||
"max_purchase_per_user": req.Plan.MaxPurchasePerUser,
|
"max_purchase_per_user": req.Plan.MaxPurchasePerUser,
|
||||||
"total_amount": req.Plan.TotalAmount,
|
"total_amount": req.Plan.TotalAmount,
|
||||||
"upgrade_group": req.Plan.UpgradeGroup,
|
"upgrade_group": req.Plan.UpgradeGroup,
|
||||||
|
|||||||
@ -21,6 +21,10 @@ type SubscriptionWaffoPancakePayRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func SubscriptionRequestWaffoPancakePay(c *gin.Context) {
|
func SubscriptionRequestWaffoPancakePay(c *gin.Context) {
|
||||||
|
if !requirePaymentCompliance(c) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var req SubscriptionWaffoPancakePayRequest
|
var req SubscriptionWaffoPancakePayRequest
|
||||||
if err := c.ShouldBindJSON(&req); err != nil || req.PlanId <= 0 {
|
if err := c.ShouldBindJSON(&req); err != nil || req.PlanId <= 0 {
|
||||||
common.ApiErrorMsg(c, "参数错误")
|
common.ApiErrorMsg(c, "参数错误")
|
||||||
|
|||||||
@ -24,7 +24,6 @@ import SettingsPaymentGateway from '../../pages/Setting/Payment/SettingsPaymentG
|
|||||||
import SettingsPaymentGatewayStripe from '../../pages/Setting/Payment/SettingsPaymentGatewayStripe';
|
import SettingsPaymentGatewayStripe from '../../pages/Setting/Payment/SettingsPaymentGatewayStripe';
|
||||||
import SettingsPaymentGatewayCreem from '../../pages/Setting/Payment/SettingsPaymentGatewayCreem';
|
import SettingsPaymentGatewayCreem from '../../pages/Setting/Payment/SettingsPaymentGatewayCreem';
|
||||||
import SettingsPaymentGatewayWaffo from '../../pages/Setting/Payment/SettingsPaymentGatewayWaffo';
|
import SettingsPaymentGatewayWaffo from '../../pages/Setting/Payment/SettingsPaymentGatewayWaffo';
|
||||||
import SettingsPaymentGatewayWaffoPancake from '../../pages/Setting/Payment/SettingsPaymentGatewayWaffoPancake';
|
|
||||||
import { API, showError, showSuccess, toBoolean } from '../../helpers';
|
import { API, showError, showSuccess, toBoolean } from '../../helpers';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import RiskAcknowledgementModal from '../common/modals/RiskAcknowledgementModal';
|
import RiskAcknowledgementModal from '../common/modals/RiskAcknowledgementModal';
|
||||||
@ -305,13 +304,6 @@ const PaymentSetting = () => {
|
|||||||
hideSectionTitle
|
hideSectionTitle
|
||||||
/>
|
/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane tab={t('Waffo Pancake 设置')} itemKey='waffo-pancake'>
|
|
||||||
<SettingsPaymentGatewayWaffoPancake
|
|
||||||
options={inputs}
|
|
||||||
refresh={onRefresh}
|
|
||||||
hideSectionTitle
|
|
||||||
/>
|
|
||||||
</Tabs.TabPane>
|
|
||||||
<Tabs.TabPane tab={t('Waffo 设置')} itemKey='waffo'>
|
<Tabs.TabPane tab={t('Waffo 设置')} itemKey='waffo'>
|
||||||
<SettingsPaymentGatewayWaffo
|
<SettingsPaymentGatewayWaffo
|
||||||
options={inputs}
|
options={inputs}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user