- 21 Apr, 2026 40 commits
-
-
Stefy Lanza (nextime / spora ) authored
Task 7: Implement wallet operations, top up flow, auto top up logic, subscription renewal integration with all tests
-
Stefy Lanza (nextime / spora ) authored
- Update _renew_subscription() to check wallet first before payment method - Add wallet debit for renewal amount with transaction logging - Implement auto top up trigger when balance insufficient - Add renewal retry after successful auto top up - Maintain grace period and existing error handling - Add trigger_auto_topup function to scheduler.py - Add test cases for wallet renewal flow
-
Stefy Lanza (nextime / spora ) authored
- Add _create_wallet_tables() migration method in PaymentMigrations class - user_wallets table with balance, currency, auto topup configuration - wallet_transactions table with full transaction history - Add proper table indexes for performance - Update test_migrations.py to verify new tables exist - All migration tests passing
-
Stefy Lanza (nextime / spora ) authored
- Fix infinite recursion loop in corrupted config recovery - Always initialize self.rotations attribute before loading - Fix invalid default providers.json (remove extra condensation key) - Fix users table order - create table before column migrations - Remove invalid extra braces from default rotations.json - Corrupted configs are now safely backed up with timestamps - No more JSON decode errors on first run - No more "no such table: users" warning on first run
-
Stefy Lanza (nextime / spora ) authored
- Copy markdown prompt files (*.md) to ~/.aisbf/ on first run - Fix installation location search order (user-local first, then system) - Add JSON validation and proper error handling for all config files - Fix invalid JSON syntax in default rotations.json - Existing files are never overwritten - Config files are properly copied from ~/.local/share/aisbf, /usr/local/share/aisbf, /usr/share/aisbf or source directory depending on installation type
-
Stefy Lanza (nextime / spora ) authored
- Document all 8 commits and changes made - List files modified and what changed - Provide before/after API comparison - Include configuration requirements - Add testing checklist and monitoring guidelines - Reference all documentation and code locations - Mark migration status as COMPLETE
-
Stefy Lanza (nextime / spora ) authored
- Add /api/webhooks/* to auth exemption list in both middlewares - PayPal and Stripe webhooks can now receive events without Bearer token - Webhooks authenticate via signature verification instead - Fixes issue where PayPal would fail to deliver webhook events
-
Stefy Lanza (nextime / spora ) authored
- Complete PayPal Developer Dashboard configuration steps - Webhook setup and event type selection - Application configuration instructions - Testing procedures for payment flow and webhooks - API flow diagrams for setup and charging - Troubleshooting common issues - Security considerations and production checklist - Monitoring and maintenance guidelines - Support resources and references
-
Stefy Lanza (nextime / spora ) authored
- Document current webhook implementation status - Provide complete code example for signature verification - Explain why signature verification is critical for production - Add references to PayPal documentation - Include testing guidelines
-
Stefy Lanza (nextime / spora ) authored
- Add _verify_webhook_signature() method with TODO for proper implementation - Log warning when webhook_secret is not configured - Prepare for production-grade webhook security - Reference PayPal's verify-webhook-signature endpoint
-
Stefy Lanza (nextime / spora ) authored
- Add handlers for CHECKOUT.ORDER.COMPLETED/APPROVED - Add handlers for PAYMENT.CAPTURE.COMPLETED/DENIED/REFUNDED - Add handlers for VAULT.PAYMENT-TOKEN.CREATED/DELETED - Add handlers for CUSTOMER.DISPUTE.CREATED/RESOLVED - Maintain backward compatibility with legacy PAYMENT.SALE events - Add TODO comments for database integration points
-
Stefy Lanza (nextime / spora ) authored
- Remove call to non-existent cancel_billing_agreement method - PayPal Vault tokens remain in PayPal's system when deleted from our DB - Add logging for PayPal payment method deletion - Maintains backward compatibility with legacy billing agreements
-
Stefy Lanza (nextime / spora ) authored
- Update _charge_payment() to detect paypal_v3 gateway and use charge_payment_token() - Add gateway column to payment_method query in renewal processor - Supports off-session merchant-initiated charges for auto-renewals - Maintains backward compatibility with legacy billing agreements
-
Stefy Lanza (nextime / spora ) authored
- Add create_setup_token() for PayPal Vault setup token generation - Add create_payment_token() to exchange setup token for permanent payment token - Add charge_payment_token() for off-session merchant-initiated transactions - Update payment_methods table schema with gateway, last4, brand, paypal_email columns - Update dashboard routes to use new vault flow instead of billing agreements - No longer requires Reference Transactions to be enabled on PayPal account - Supports merchant-initiated billing for auto top-ups without user presence
-
Stefy Lanza (nextime / spora ) authored
- Fix model type reporting for user providers in analytics table - Fix undefined placeholder variable in duplicate cache settings migration
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
Refactor: Move cache settings API from /api/user/cache-settings to /dashboard/api/cache-settings and use session-based auth
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
Fix: Restore missing model_performance, cost_overview, recommendations, and optimization_savings variables
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
Fix: Call _run_config_migrations from _initialize_database to ensure user_cache_settings table is created
-
Stefy Lanza (nextime / spora ) authored
-
Stefy Lanza (nextime / spora ) authored
-