Update: 2026-06-16 17:47:17
This commit is contained in:
@@ -38,7 +38,7 @@ function finalizeClickPayment(PDO $con, int $invoiceId): array
|
||||
|
||||
} catch (Exception $e) {
|
||||
error_log("Finalization Exception: " . $e->getMessage());
|
||||
return ['success' => false, 'message' => $e->getMessage()];
|
||||
return ['success' => false, 'message' => 'Finalization failed'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ try {
|
||||
printFailure("Failed to save record");
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
printFailure("Database error: " . $e->getMessage());
|
||||
error_log("[addPaymentToken] " . $e->getMessage());
|
||||
printFailure("Database error");
|
||||
}
|
||||
|
||||
function generateSecureToken($driverID, $amount) {
|
||||
|
||||
@@ -98,6 +98,7 @@ try {
|
||||
if ($con->inTransaction()) {
|
||||
$con->rollBack();
|
||||
}
|
||||
printFailure("An error occurred: " . $e->getMessage());
|
||||
error_log("add_s2s_reward: " . $e->getMessage());
|
||||
printFailure("An error occurred");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -16,7 +16,7 @@ function runCleanup($con, $deleteQuery, $tableName) {
|
||||
echo "Cleanup completed for table: $tableName\n";
|
||||
echo "Rows affected: " . $stmt->rowCount() . "\n\n";
|
||||
} catch (Exception $e) {
|
||||
echo "Error cleaning $tableName: " . $e->getMessage() . "\n\n";
|
||||
echo "Error cleaning $tableName\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ try {
|
||||
]);
|
||||
|
||||
} catch (Exception $e) {
|
||||
printFailure("An error occurred: " . $e->getMessage());
|
||||
error_log("[get_s2s_wallet_dashboard] " . $e->getMessage());
|
||||
printFailure("An error occurred");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -38,7 +38,7 @@ function finalizeMtnPayment(PDO $con, int $invoiceId): array
|
||||
|
||||
} catch (Exception $e) {
|
||||
error_log("Finalization Exception: " . $e->getMessage());
|
||||
return ['success' => false, 'message' => $e->getMessage()];
|
||||
return ['success' => false, 'message' => 'Finalization failed'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ try {
|
||||
if ($con->inTransaction()) {
|
||||
$con->rollBack();
|
||||
}
|
||||
printFailure("Database error: " . $e->getMessage());
|
||||
error_log("[passengerWallet/add] " . $e->getMessage());
|
||||
printFailure("Database error");
|
||||
}
|
||||
?>
|
||||
@@ -24,7 +24,8 @@ try {
|
||||
printFailure("Failed to save record");
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
printFailure("Database error: " . $e->getMessage());
|
||||
error_log("[addPaymentTokenPassenger] " . $e->getMessage());
|
||||
printFailure("Database error");
|
||||
}
|
||||
|
||||
// Rest of your code including the generateSecureToken function...
|
||||
|
||||
@@ -54,6 +54,7 @@ try {
|
||||
if ($con->inTransaction()) {
|
||||
$con->rollBack();
|
||||
}
|
||||
printFailure("An error occurred: " . $e->getMessage());
|
||||
error_log("add_s2s_debt: " . $e->getMessage()); // logged server-side only
|
||||
printFailure("An error occurred");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -92,6 +92,7 @@ try {
|
||||
if ($con->inTransaction()) {
|
||||
$con->rollBack();
|
||||
}
|
||||
printFailure("Transaction Failed: " . $e->getMessage());
|
||||
error_log("[process_wait_compensation] " . $e->getMessage());
|
||||
printFailure("Transaction Failed");
|
||||
}
|
||||
?>
|
||||
@@ -49,5 +49,6 @@ try {
|
||||
if ($con->inTransaction()) {
|
||||
$con->rollBack();
|
||||
}
|
||||
printFailure("An error occurred: " . $e->getMessage());
|
||||
error_log("[payment/add] " . $e->getMessage());
|
||||
printFailure("An error occurred");
|
||||
}
|
||||
@@ -137,5 +137,5 @@ try {
|
||||
$con->rollBack();
|
||||
}
|
||||
error_log("[process_ride_payments] Transaction FAILED for ride $rideId: " . $e->getMessage());
|
||||
printFailure("Transaction failed: " . $e->getMessage());
|
||||
printFailure("Transaction failed");
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ try {
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// logDebug("Exception: " . $e->getMessage());
|
||||
printFailure("An error occurred: " . $e->getMessage());
|
||||
error_log("[seferWallet/add] " . $e->getMessage());
|
||||
printFailure("An error occurred");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user