diff --git a/server-rs/crates/api-server/src/runtime_profile.rs b/server-rs/crates/api-server/src/runtime_profile.rs index fbdd8bdc2..ae0bfdb73 100644 --- a/server-rs/crates/api-server/src/runtime_profile.rs +++ b/server-rs/crates/api-server/src/runtime_profile.rs @@ -1821,14 +1821,18 @@ fn build_wechat_virtual_pay_params( .with_message("当前充值商品不存在,请刷新后再试") })?, RuntimeProfileRechargeProductKind::Membership => { - // 会员商品不在商品配置表里:确认档位仍在目录中即可,购买数量固定为 1。 + // 会员商品不在商品配置表里:确认档位仍可售(在售且非 Normal 占位)即可,购买数量固定为 1。 let (plan, _) = module_runtime::parse_runtime_profile_membership_product_id(&order.product_id) .ok_or_else(|| { AppError::from_status(StatusCode::BAD_REQUEST) .with_message("当前会员套餐不存在,请刷新后再试") })?; - if !center.membership_plans.iter().any(|item| item.plan == plan) { + if !center + .membership_plans + .iter() + .any(|item| item.plan == plan && item.enabled && item.plan.is_purchasable()) + { return Err(AppError::from_status(StatusCode::BAD_REQUEST) .with_message("当前会员套餐不存在,请刷新后再试")); }