Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix message for when a payment method is deleted #201

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions endpoints/payments/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
$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;
Expand All @@ -26,4 +26,4 @@
}
$db->close();

?>
?>
1 change: 1 addition & 0 deletions includes/i18n/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"add_custom_payment" => "Add Custom Payment Method",
"payment_method_name" => "Payment Method Name",
"payment_method_added_successfuly" => "Payment method added successfully",
"payment_method_removed" => "Payment method removed",
"disable" => "Disable",
"enable" => "Enable",
"rename_payment_method" => "Rename Payment Method",
Expand Down
3 changes: 2 additions & 1 deletion includes/i18n/pt_br.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"add_custom_payment" => "Adicionar um método de pagamento personalizado",
"payment_method_name" => "Nome do método de pagamento",
"payment_method_added_successfuly" => "Método de pagamento adicionado com sucesso",
"payment_method_removed" => "Método de pagamento excluído",
"disable" => "Desativar",
"enable" => "Ativar",
"rename_payment_method" => "Renomear método de pagamento",
Expand Down Expand Up @@ -166,7 +167,7 @@
"category_in_use" => "Essa categoria está em uso em uma assinatura e não pode ser removida",
"failed_remove_category" => "Erro ao remover categoria",
"category_saved" => "Categoria salva",
"category_removed" => "Category excluída",
"category_removed" => "Categoria excluída",
"sort_order_saved" => "Direção de ordenação salva",
// Currency
"currency_saved" => "foi salva.",
Expand Down
Loading