feat(pay): guest cash purchase with signed cookie unlock (zibll-style)
Allow pay_no_logged_in cash content orders (user_id=0), set aksrt_pay_* cookies on paid, accept cookie in access state, and expose guest CTA on paywall/box.
This commit is contained in:
1 parent
8f15d16d35
commit
8e9e05c859
6 files changed
+301
-35
No files matched your search
@@ -69,6 +69,18 @@ $is_need_vip = $gate_blocked && $gate_code === 'aksrt_need_vip';
|
||||
$is_need_purchase = $gate_blocked && $gate_code === 'aksrt_need_purchase';
|
||||
// Points unpaid may also surface as need_purchase; treat low balance only after cashier.
|
||||
$is_low_credit = false;
|
||||
$allow_guest_buy = !is_user_logged_in()
|
||||
&& function_exists('aksrt_allow_guest_content_pay')
|
||||
&& aksrt_allow_guest_content_pay($post_id)
|
||||
&& $pay_modo !== 'points'
|
||||
&& $user_amount > 0
|
||||
&& empty($access['need_vip']);
|
||||
// If gate only says login but guest buy allowed for cash posts, convert to purchase CTA.
|
||||
if ($is_need_login && $allow_guest_buy) {
|
||||
$is_need_login = false;
|
||||
$is_need_purchase = true;
|
||||
$gate_blocked = true;
|
||||
}
|
||||
|
||||
// Zibll pay_free_logged_show: free downloads still require login.
|
||||
$free_logged_show = !empty($paid_settings['free_logged_show']);
|
||||
|
||||
Reference in new issue
Block a user