Saved cards expiring: each night cards expiring next month or lately are read back from Stripe so a card the bank replaced keeps its new expiry, and for each card on autopay for an active recurring invoice the client's primary and billing contacts are emailed a month before the month it expires and again in it (once just after, within 60 days, for one that ran out unannounced) with an Add your new card link that needs no sign-in and puts the new card in place of the old on every recurring invoice it paid, the team gets a Card Expiring notification each time and an Autopay Failed notification with Stripe's reason when an autopay charge doesn't go through, the portal no longer turns away a card Stripe has renewed, Settings > Invoices > Paid online can turn the client emails off and Saved Cards shows when each card was checked and when the team was told (DB 4.3.8, functions/card_expiry.php, guest/guest_card_update.php); 26.12.4 changelog

This commit is contained in:
johnnyq
2026-12-01 21:22:51 -05:00
parent 19c09b670c
commit 8b2426c841
16 changed files with 828 additions and 10 deletions

5
db.sql
View File

@@ -933,6 +933,10 @@ CREATE TABLE `client_saved_payment_methods` (
`saved_payment_provider_id` int(11) NOT NULL,
`saved_payment_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`saved_payment_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`saved_payment_checked_at` datetime DEFAULT NULL,
`saved_payment_reminded_expiry` int(11) DEFAULT NULL,
`saved_payment_reminded` tinyint(1) NOT NULL DEFAULT 0,
`saved_payment_update_key` varchar(64) DEFAULT NULL,
PRIMARY KEY (`saved_payment_id`),
KEY `saved_payment_client_id` (`saved_payment_client_id`),
KEY `saved_payment_provider_id` (`saved_payment_provider_id`),
@@ -4163,6 +4167,7 @@ CREATE TABLE `settings` (
`config_invoice_paid_notification_email` varchar(200) DEFAULT NULL,
`config_invoice_paid_lead_to_client` tinyint(1) NOT NULL DEFAULT 1,
`config_invoice_offer_autopay` tinyint(1) NOT NULL DEFAULT 1,
`config_invoice_card_expiry_reminders` tinyint(1) NOT NULL DEFAULT 1,
`config_invoice_show_tax_id` tinyint(1) NOT NULL DEFAULT 0,
`config_tax_default_id` int(11) NOT NULL DEFAULT 0,
`config_tax_time` tinyint(1) NOT NULL DEFAULT 0,