- 16 Apr, 2026 27 commits
-
-
Your Name authored
- Add downgrade_subscription() method to SubscriptionManager - Sets pending_tier_id for scheduled downgrade at period end - No immediate charge or refund - User keeps current tier until period end - Returns scheduled downgrade date - Add cancel_subscription() method to SubscriptionManager - Sets cancel_at_period_end flag - User retains access until period end - No refund issued - Returns cancellation date - Add comprehensive tests for both operations - Test downgrade scheduling and no-charge behavior - Test cancellation scheduling and no-refund behavior - Test error cases (no subscription, invalid tier) All 12 subscription tests passing.
-
Your Name authored
- Add upgrade_subscription() method to SubscriptionManager - Calculate prorated charge based on unused time in billing period - Formula: new_price - (old_price × unused_fraction) - Update subscription tier immediately while keeping same period end date - Charge prorated amount via existing payment method - Add comprehensive tests for proration calculations - Test edge cases: no subscription, invalid tier, accurate proration math
-
Your Name authored
- Create SubscriptionManager class with create_subscription method - Validate tier and payment method before creating subscription - Calculate amount based on billing cycle (monthly/yearly) - Check for existing active subscription - Calculate period dates with immediate start - Charge payment via fiat (card/PayPal) or crypto - Create subscription record and update user tier - Add comprehensive test coverage
-
Your Name authored
-
Your Name authored
- Add fiat handler initialization (StripeHandler, PayPalHandler) - Add add_stripe_payment_method() method - Add initiate_paypal_billing_agreement() method - Add complete_paypal_billing_agreement() method - Add get_payment_methods() method to retrieve all user payment methods - Add delete_payment_method() with validation to prevent deletion of methods used by active subscriptions
-
Your Name authored
-
Your Name authored
- Create StripePaymentHandler class with async operations - Implement add_payment_method() with .00 authorization hold verification - Authorization hold is immediately cancelled to release funds - Get or create Stripe customer with metadata - Store payment method in database - Handle webhooks with signature verification - Add stripe_customer_id column to users table - Add comprehensive tests for Stripe integration
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
Your Name authored
-
- 15 Apr, 2026 12 commits
- 14 Apr, 2026 1 commit
-
-
Your Name authored
-