feat: implement recurring invoice system for subscription renewals
- Add SUBSCRIPTION_RENEWAL_JOB_NAME and related constants for renewal jobs - Implement createSubscriptionRenewalInvoice in invoice processor - Add automatic renewal invoice creation 7 days before subscription expiry - Handle subscription renewals in payInvoice method with period extension - Add scheduleNextRenewalJob method for continuous renewal scheduling - Prevent duplicate renewal invoices and jobs - Skip renewal jobs for free plans - Send notifications for renewal opportunities - Fix duplicate job scheduling issue by removing from subscribeToPlan Features: - Automatic renewal invoice creation before expiry - Subscription period extension on renewal payment - Continuous renewal cycle scheduling - Comprehensive error handling and validation - Integration with existing notification system
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
export enum SubscriptionStatus {
|
||||
ACTIVE = "ACTIVE",
|
||||
INACTIVE = "INACTIVE",
|
||||
// CANCELED = "CANCELED",
|
||||
// EXPIRED = "EXPIRED",
|
||||
CANCELED = "CANCELED",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user