feat(admin): 续费缺订阅时 BMPA 提示补齐去订阅管理查找订阅入口
This commit is contained in:
@@ -209,6 +209,16 @@
|
||||
$markPaidBlockedByMissingSubscriptionOnRenewal = ((string) ($order->order_type ?? '') === 'renewal')
|
||||
&& ((int) ($order->site_subscription_id ?? 0) <= 0);
|
||||
|
||||
// 治理引导:续费缺订阅时提供“去订阅管理查找订阅”入口(回到当前订单详情自身)
|
||||
$missingSubscriptionHelpUrl = '';
|
||||
if ($markPaidBlockedByMissingSubscriptionOnRenewal) {
|
||||
$missingSubscriptionHelpUrl = \App\Support\BackUrl::withBack('/admin/site-subscriptions?' . \Illuminate\Support\Arr::query([
|
||||
'merchant_id' => (int) ($order->merchant_id ?? 0) ?: null,
|
||||
'plan_id' => (int) ($order->plan_id ?? 0) ?: null,
|
||||
'page' => null,
|
||||
]), $orderShowSelf);
|
||||
}
|
||||
|
||||
$tol = (float) config('saasshop.amounts.tolerance', 0.01);
|
||||
$tolCents = (int) round($tol * 100);
|
||||
$tolCents = max(1, $tolCents);
|
||||
@@ -238,6 +248,10 @@
|
||||
原因:当前订单类型为「续费」,但未绑定订阅(site_subscription_id 为空)。
|
||||
<span class="muted">|</span>
|
||||
<span class="muted">请先补齐订阅关联后再处理。</span>
|
||||
@if($missingSubscriptionHelpUrl !== '')
|
||||
<span class="muted">|</span>
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $missingSubscriptionHelpUrl !!}">去订阅管理查找订阅</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@if($markPaidBlockedByReceiptMismatch)
|
||||
|
||||
Reference in New Issue
Block a user