Update: 2026-05-07 03:26:24
This commit is contained in:
@@ -139,7 +139,7 @@ function activateSubscription(\PDO $db, array $payment, string $userId): void
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Log activation
|
// Log activation
|
||||||
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, details) VALUES (?, ?, 'subscription.activated', 'payment', ?, ?)");
|
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, new_data) VALUES (?, ?, 'subscription.activated', 'payment', ?, ?)");
|
||||||
$logStmt->execute([
|
$logStmt->execute([
|
||||||
$payment['tenant_id'],
|
$payment['tenant_id'],
|
||||||
$userId,
|
$userId,
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ try {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// 7. Log
|
// 7. Log
|
||||||
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, details) VALUES (?, ?, 'payment.created', 'payment', ?, ?)");
|
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, new_data) VALUES (?, ?, 'payment.created', 'payment', ?, ?)");
|
||||||
$logStmt->execute([
|
$logStmt->execute([
|
||||||
$tenantId,
|
$tenantId,
|
||||||
$userId,
|
$userId,
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Audit log
|
// Audit log
|
||||||
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, details) VALUES (?, ?, ?, 'payment', ?, ?)");
|
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, new_data) VALUES (?, ?, ?, 'payment', ?, ?)");
|
||||||
$logStmt->execute([
|
$logStmt->execute([
|
||||||
$payment['tenant_id'],
|
$payment['tenant_id'],
|
||||||
$decoded['user_id'],
|
$decoded['user_id'],
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ function activateSubscription(\PDO $db, array $payment, string $userId): void
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Log activation
|
// Log activation
|
||||||
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, details) VALUES (?, ?, 'subscription.activated', 'payment', ?, ?)");
|
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, new_data) VALUES (?, ?, 'subscription.activated', 'payment', ?, ?)");
|
||||||
$logStmt->execute([
|
$logStmt->execute([
|
||||||
$payment['tenant_id'],
|
$payment['tenant_id'],
|
||||||
$userId,
|
$userId,
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ function activateSubscription(\PDO $db, array $payment, string $userId): void
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Log activation
|
// Log activation
|
||||||
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, details) VALUES (?, ?, 'subscription.activated', 'payment', ?, ?)");
|
$logStmt = $db->prepare("INSERT INTO audit_logs (tenant_id, user_id, action, entity_type, entity_id, new_data) VALUES (?, ?, 'subscription.activated', 'payment', ?, ?)");
|
||||||
$logStmt->execute([
|
$logStmt->execute([
|
||||||
$payment['tenant_id'],
|
$payment['tenant_id'],
|
||||||
$userId,
|
$userId,
|
||||||
|
|||||||
Reference in New Issue
Block a user