diff --git a/app/modules_app/payments/bot_webhook.php b/app/modules_app/payments/bot_webhook.php index d5a9f84..65e3e76 100644 --- a/app/modules_app/payments/bot_webhook.php +++ b/app/modules_app/payments/bot_webhook.php @@ -139,7 +139,7 @@ function activateSubscription(\PDO $db, array $payment, string $userId): void ]); // 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([ $payment['tenant_id'], $userId, diff --git a/app/modules_app/payments/create.php b/app/modules_app/payments/create.php index a76d854..161465e 100644 --- a/app/modules_app/payments/create.php +++ b/app/modules_app/payments/create.php @@ -83,7 +83,7 @@ try { ]); // 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([ $tenantId, $userId, diff --git a/app/modules_app/payments/review.php b/app/modules_app/payments/review.php index 8ce2165..b3d48bb 100644 --- a/app/modules_app/payments/review.php +++ b/app/modules_app/payments/review.php @@ -84,7 +84,7 @@ try { } // 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([ $payment['tenant_id'], $decoded['user_id'], diff --git a/app/modules_app/payments/upload_receipt.php b/app/modules_app/payments/upload_receipt.php index 13b88d9..2df3c48 100644 --- a/app/modules_app/payments/upload_receipt.php +++ b/app/modules_app/payments/upload_receipt.php @@ -274,7 +274,7 @@ function activateSubscription(\PDO $db, array $payment, string $userId): void ]); // 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([ $payment['tenant_id'], $userId, diff --git a/app/modules_app/payments/verify_reference.php b/app/modules_app/payments/verify_reference.php index 8be7898..9349095 100644 --- a/app/modules_app/payments/verify_reference.php +++ b/app/modules_app/payments/verify_reference.php @@ -144,7 +144,7 @@ function activateSubscription(\PDO $db, array $payment, string $userId): void ]); // 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([ $payment['tenant_id'], $userId,