- Trait-split content-pay, vip-service, balance-service, order-repository - Procedural split of user module into user-parts/* - Split scripts enqueue_public into part-1b/1c; settings bulk trait - Bootstrap: explicit notifications, widgets glob-only, home-modules init - ADR: freeze domain placement for pay/revenue/notify boundaries
39 lines
777 B
PHP
39 lines
777 B
PHP
<?php
|
|
/**
|
|
* AKSRT Balance Service — recharge packages + transfer REST.
|
|
*
|
|
* Zibll parity targets:
|
|
* - balance charge packages (pay_balance_product)
|
|
* - balance/points transfer
|
|
* - credit wallet after paid recharge orders
|
|
*
|
|
* @package AKSRT
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
class AKSRT_Balance_Service {
|
|
use AKSRT_Balance_Service_Rest;
|
|
use AKSRT_Balance_Service_Charge;
|
|
use AKSRT_Balance_Service_Points;
|
|
|
|
private static $instance = null;
|
|
|
|
|
|
|
|
public static function get_instance(): self {
|
|
if (null === self::$instance) {
|
|
self::$instance = new self();
|
|
}
|
|
return self::$instance;
|
|
}
|
|
|
|
|
|
|
|
public function init(): void {
|
|
add_action('rest_api_init', [$this, 'register_routes']);
|
|
add_action('aksrt_order_paid', [$this, 'on_order_paid'], 20, 2);
|
|
}
|
|
|
|
}
|