mirror of
https://github.com/itflow-org/itflow
synced 2026-03-25 14:55:38 +00:00
No need for a sql delete on recurring payments when deleting a saved payment method as SQL cascadely deletes the recurring payment if saved payment method is deleted
This commit is contained in:
@@ -58,8 +58,7 @@ if (isset($_GET['delete_saved_payment'])) {
|
|||||||
// Remove payment method from ITFlow
|
// Remove payment method from ITFlow
|
||||||
mysqli_query($mysqli, "DELETE FROM client_saved_payment_methods WHERE saved_payment_id = $saved_payment_id");
|
mysqli_query($mysqli, "DELETE FROM client_saved_payment_methods WHERE saved_payment_id = $saved_payment_id");
|
||||||
|
|
||||||
// Remove All Associted Auto Payment Methods on recurring invoices
|
// SQL Cascade delete will Remove All Associated Auto Payment Methods on recurring invoices in the recurring payments table.
|
||||||
mysqli_query($mysqli, "DELETE FROM recurring_payments WHERE recurring_payment_saved_payment_id = $saved_payment_id");
|
|
||||||
|
|
||||||
// Logging & Redirect
|
// Logging & Redirect
|
||||||
logAction("Payment Provider", "Update", "$session_name deleted saved payment method $saved_payment_description (PM: $payment_method)", $client_id);
|
logAction("Payment Provider", "Update", "$session_name deleted saved payment method $saved_payment_description (PM: $payment_method)", $client_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user