feat(forum): multi-gateway cashier for pay-visibility topics
Replace balance-only AJAX topic purchase with AKSRT_Topic_Pay REST cashier (resource orders + Payment_Gateway), reuse cms-download modal, and unlock on aksrt_order_paid.
This commit is contained in:
1 parent
3f06675b8c
commit
cea22daae7
13 files changed
+768
-262
No files matched your search
@@ -353,7 +353,6 @@ class AKSRT_Forum {
|
||||
add_action('wp_ajax_aksrt_forum_follow_plate', [$this, 'ajax_follow_plate']);
|
||||
add_action('wp_ajax_aksrt_forum_purchase_plate_follow', [$this, 'ajax_purchase_plate_follow']);
|
||||
add_action('wp_ajax_aksrt_forum_unlock_topic', [$this, 'ajax_unlock_topic']);
|
||||
add_action('wp_ajax_aksrt_forum_purchase_topic', [$this, 'ajax_purchase_topic']);
|
||||
|
||||
// §7.4 draft persistence
|
||||
add_action('wp_ajax_aksrt_forum_save_draft', [$this, 'ajax_save_draft']);
|
||||
@@ -459,10 +458,6 @@ class AKSRT_Forum {
|
||||
$this->topic_service()->ajax_unlock_topic();
|
||||
}
|
||||
|
||||
public function ajax_purchase_topic(): void {
|
||||
$this->topic_service()->ajax_purchase_topic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lightweight result helper for topic service actions.
|
||||
*
|
||||
@@ -607,6 +602,10 @@ class AKSRT_Forum {
|
||||
return $this->topic_service()->resolve_topic_pay_price($topic_id, $user_id);
|
||||
}
|
||||
|
||||
public function mark_topic_unlocked(int $user_id, int $topic_id): void {
|
||||
$this->topic_service()->mark_topic_unlocked($user_id, $topic_id);
|
||||
}
|
||||
|
||||
public function prepare_vote_meta(array $data): array {
|
||||
return $this->topic_service()->prepare_vote_meta($data);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user