message for when a payment method is deleted (#201)

This commit is contained in:
Davi Alexandre
2024-03-08 23:27:19 +01:00
committed by GitHub
parent b543fa3763
commit 23e3a189d0
3 changed files with 6 additions and 4 deletions
+3 -3
View File
@@ -8,10 +8,10 @@ if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
$deleteQuery = "DELETE FROM payment_methods WHERE id = :paymentMethodId";
$deleteStmt = $db->prepare($deleteQuery);
$deleteStmt->bindParam(':paymentMethodId', $paymentMethodId, SQLITE3_INTEGER);
if ($deleteStmt->execute()) {
$success['success'] = true;
$success['message'] = translate('payment_method_added_successfuly', $i18n);
$success['message'] = translate('payment_method_removed', $i18n);
$json = json_encode($success);
header('Content-Type: application/json');
echo $json;
@@ -26,4 +26,4 @@ if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
}
$db->close();
?>
?>