NODE JS introduction: socket polling

This commit is contained in:
Thanakorn S
2026-05-22 17:01:59 +07:00
parent 648efee991
commit 5a3bfa3435
17 changed files with 1520 additions and 2135 deletions
@@ -52,6 +52,8 @@
$answer['new_id'] = $new_id;
$answer['message'] = 'Payment posted.';
(new UsageGuard($pdo1, $company_id, $packages))->increment();
require_once '../../../assets/utils/notify_node.php';
notify_node('payment_posted', ['id' => $new_id], $company_id);
exit(json_encode($answer));
}
@@ -52,6 +52,8 @@
$answer['new_id'] = $new_id;
$answer['message'] = 'Receipt posted.';
(new UsageGuard($pdo1, $company_id, $packages))->increment();
require_once '../../../assets/utils/notify_node.php';
notify_node('receipt_posted', ['id' => $new_id], $company_id);
exit(json_encode($answer));
}