feat: adjust affiliate commissions and withdrawal strategy
This commit is contained in:
1 parent
8fc6fe5312
commit
929603b9e2
13 files changed
+93
-111
No files matched your search
@@ -26,7 +26,7 @@ $withdraw_on = !empty($affiliate['enabled'])
|
||||
if ($withdraw_on && class_exists('\AKSRT\Settings\Capabilities') && !\AKSRT\Settings\Capabilities::user_can('balance_withdraw', $user_id)) {
|
||||
$withdraw_on = false;
|
||||
}
|
||||
$withdraw_min = max(1, (float) ($affiliate['min_withdrawal'] ?? $withdrawal['min_amount'] ?? 50));
|
||||
$withdraw_min = max(1, (float) ($withdrawal['min_amount'] ?? 50));
|
||||
$wallet_fmt = class_exists('\AKSRT\Credits\Balance')
|
||||
? \AKSRT\Credits\Balance::format((float) \AKSRT\Credits\Balance::balance($user_id))
|
||||
: '0.00';
|
||||
@@ -38,7 +38,9 @@ $available_commission = class_exists('\AKSRT\Credits\Balance')
|
||||
? (float) \AKSRT\Credits\Balance::balance($user_id)
|
||||
: (float) ($commission_stats['settled'] ?? 0);
|
||||
$vip_ratios = [];
|
||||
$commission_ratio = (float) ($affiliate['ratio'] ?? 0);
|
||||
$commission_ratio = class_exists('\AKSRT\Settings\Settings')
|
||||
? (float) \AKSRT\Settings\Settings::affiliate_ratio_for_user($user_id)
|
||||
: 0.0;
|
||||
$details_text = trim((string) ($affiliate['promotion_text'] ?? ''));
|
||||
if ($details_text === '') {
|
||||
$details_text = __('好友通过推广链接完成符合条件的订单后,系统会按当前佣金比例记录返佣,结算后进入可提现余额。', 'aksrt');
|
||||
|
||||
Reference in new issue
Block a user