feat(pay): content cashier coupon and rebate discount chain
Wire zibll-style cash content discounts: VIP list price → buyer 推广折扣 → coupon, then commission on final pay. Reuse AKSRT_Coupon, add Invite::get_referrer, cashier UI, and paid-time coupon burn + rebate_log.
This commit is contained in:
@@ -137,6 +137,10 @@ class AKSRT_Domain_Model {
|
||||
'show_sales' => true,
|
||||
// Zibll: free daily quota overbuy price (cash or points by pay_modo).
|
||||
'download_limit_over_price' => 0.0,
|
||||
// Content cashier: coupon + buyer-facing 推广折扣 (zibll posts_zibpay).
|
||||
'coupon_s' => false,
|
||||
'coupon_desc' => '',
|
||||
'pay_rebate_discount' => 0.0,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -337,6 +341,9 @@ class AKSRT_Domain_Model {
|
||||
$meta['free_preview'] = wp_kses_post((string) ($raw['free_preview'] ?? ''));
|
||||
$meta['show_sales'] = !isset($raw['show_sales']) || !empty($raw['show_sales']);
|
||||
$meta['download_limit_over_price'] = max(0, (float) ($raw['download_limit_over_price'] ?? 0));
|
||||
$meta['coupon_s'] = !empty($raw['coupon_s']);
|
||||
$meta['coupon_desc'] = sanitize_textarea_field((string) ($raw['coupon_desc'] ?? ''));
|
||||
$meta['pay_rebate_discount'] = max(0, (float) ($raw['pay_rebate_discount'] ?? 0));
|
||||
|
||||
return $meta;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user