fix: 支付页去掉货币列,包年/永久货币由后端自动带
Product 映射只保留计划与 PROD_xxx;包年默认 CNY、永久默认 USD,避免误填干扰。
This commit is contained in:
1 parent
7c146cb639
commit
d94da2129c
2 files changed
+19
-42
No files matched your search
@@ -453,15 +453,17 @@ func productIDForPlan(cfg WaffoConfig, planType string) string {
|
||||
}
|
||||
|
||||
func currencyForPlan(cfg WaffoConfig, planType string) string {
|
||||
switch strings.TrimSpace(planType) {
|
||||
switch strings.TrimSpace(strings.ToLower(planType)) {
|
||||
case "yearly", "monthly":
|
||||
if cfg.CurrencyYearly != "" {
|
||||
return cfg.CurrencyYearly
|
||||
}
|
||||
return "CNY" // OpsXshell 包年默认人民币 // Logan.Li
|
||||
case "perpetual", "lifetime":
|
||||
if cfg.CurrencyPerpetual != "" {
|
||||
return cfg.CurrencyPerpetual
|
||||
}
|
||||
return "USD" // OpsXshell 永久默认美元 // Logan.Li
|
||||
}
|
||||
if cfg.Currency != "" {
|
||||
return cfg.Currency
|
||||
|
||||
Reference in new issue
Block a user