feat(user-center): add cash wallet balance separate from credits

Introduce AKSRT_Balance (user_meta aksrt_balance + balance_log) for
Zibll-like pay_balance wallet. User center assets panel shows wallet
and points; balance gateway/card-pass/refunds credit cash when enabled.
This commit is contained in:
2026-07-16 13:44:37 +08:00
parent f043d2c1ab
commit 8e0f9d989d
16 changed files with 637 additions and 74 deletions
+4
View File
@@ -432,6 +432,8 @@ if (!function_exists('aksrt_get_user_center_render_context')) {
$affiliate_settings = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_payment_affiliate_settings() : [];
$show_credit_tabs = (bool) ($dashboard['credits_enabled'] ?? false);
$currency_name = (string) ($dashboard['currency_name'] ?? __('积分', 'aksrt'));
$balance_enabled = (bool) ($dashboard['balance_enabled'] ?? false);
$wallet_balance = (float) ($dashboard['wallet_balance'] ?? 0.0);
$render_context = [
'user_center_settings' => $user_center_settings,
@@ -470,6 +472,8 @@ if (!function_exists('aksrt_get_user_center_render_context')) {
'currency_name' => $currency_name,
'credit_balance' => (float) ($dashboard['credit_balance'] ?? 0.0),
'credits_enabled' => $show_credit_tabs,
'balance_enabled' => $balance_enabled,
'wallet_balance' => $wallet_balance,
'vip_settings' => $vip_settings,
'show_invite_section' => $show_credit_tabs
&& class_exists('AKSRT_Settings')