feat: adjust affiliate commissions and withdrawal strategy

This commit is contained in:
kate522 committed 2026-08-16 23:11:01 +08:00
1 parent 8fc6fe5312
commit 929603b9e2
13 files changed
+93 -111

No files matched your search

+1 -13
View File
@@ -606,19 +606,7 @@ if (!function_exists('aksrt_get_post_rebate_discount')) {
return 0.0;
}
// Need a positive ratio for referrer (VIP tier of referrer preferred).
$ratio = (int) ($aff['ratio'] ?? 0);
$user_ratio = is_array($aff['user_ratio'] ?? null) ? $aff['user_ratio'] : [];
$ref_vip = 0;
if (function_exists('aksrt_get_user_vip_level')) {
$ref_vip = (int) aksrt_get_user_vip_level($referrer_id);
}
if ($ref_vip >= 2 && !empty($user_ratio['vip2'])) {
$ratio = (int) $user_ratio['vip2'];
} elseif ($ref_vip >= 1 && !empty($user_ratio['vip1'])) {
$ratio = (int) $user_ratio['vip1'];
} elseif (isset($user_ratio['user'])) {
$ratio = (int) $user_ratio['user'];
}
$ratio = (int) round(\AKSRT\Settings\Settings::affiliate_ratio_for_user($referrer_id));
if ($ratio <= 0) {
return 0.0;
}