PlatformOrder create: force renewal type when subscription context present
This commit is contained in:
@@ -65,6 +65,11 @@ class PlatformOrderController extends Controller
|
||||
$defaults['order_type'] = 'new_purchase';
|
||||
}
|
||||
|
||||
// 续费下单场景:若带了 site_subscription_id,则当前阶段强制视为续费单(避免语义混乱)。
|
||||
if ($siteSubscriptionId > 0) {
|
||||
$defaults['order_type'] = 'renewal';
|
||||
}
|
||||
|
||||
// 续费下单场景:若带了 site_subscription_id,但未显式指定 merchant/plan,则从订阅上补齐默认值。
|
||||
// 目的:让“从订阅维度跳转到下单页”的链路更稳,不必每次手工二次选择。
|
||||
if ($siteSubscription) {
|
||||
|
||||
Reference in New Issue
Block a user