Add new UI for Saved Payments for payment providers

This commit is contained in:
johnnyq
2025-07-07 18:25:23 -04:00
parent c76da10747
commit 7e17fdf851
6 changed files with 239 additions and 11 deletions

View File

@@ -3734,7 +3734,7 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
PRIMARY KEY (`payment_provider_id`)
)");
mysqli_query($mysqli, "CREATE TABLE `cient_saved_payment_methods` (
mysqli_query($mysqli, "CREATE TABLE `client_saved_payment_methods` (
`saved_payment_id` INT(11) NOT NULL AUTO_INCREMENT,
`saved_payment_provider_client` VARCHAR(200) NOT NULL,
`saved_payment_provider_method` VARCHAR(200) NOT NULL,
@@ -3749,10 +3749,38 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.3'");
}
// if (CURRENT_DATABASE_VERSION == '2.2.3') {
// // Insert queries here required to update to DB version 2.2.4
if (CURRENT_DATABASE_VERSION == '2.2.3') {
// Delete all Recurring Payments that are Stripe
mysqli_query($mysqli, "DELETE FROM recurring_payments WHERE recurring_payment_method = 'Stripe'");
// Delete Stripe Specific ITFlow Client Stripe Client Relationship Table
mysqli_query($mysqli, "DROP TABLE client_stripe");
// Delete Unused Stripe and AI Settings now in their own tables
mysqli_query($mysqli, "ALTER TABLE `settings`
DROP `config_stripe_enable`,
DROP `config_stripe_publishable`,
DROP `config_stripe_secret`,
DROP `config_stripe_account`,
DROP `config_stripe_expense_vendor`,
DROP `config_stripe_expense_category`,
DROP `config_stripe_percentage_fee`,
DROP `config_stripe_flat_fee`,
DROP `config_ai_enable`,
DROP `config_ai_provider`,
DROP `config_ai_model`,
DROP `config_ai_url`,
DROP `config_ai_api_key`
");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.4'");
}
// if (CURRENT_DATABASE_VERSION == '2.2.4') {
// // Insert queries here required to update to DB version 2.2.5
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.4'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.5'");
// }
} else {