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:
2026-07-14 19:38:05 +08:00
parent 9eaddce457
commit 5d7b138c2c
11 changed files with 724 additions and 22 deletions
+7
View File
@@ -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;
}