✨ Novo Sistema de Cancelamento com Retenção Inteligente
- Wizard de 5 etapas com mensagens emocionais personalizadas
- Oferta de 3 meses grátis para cancelamentos por preço (elegível se >= 3 meses pagos)
- Cumprimento legal: período de garantia 7 dias com reembolso total
- Rastreamento de ofertas em DB (impede reuso)
- Analytics de cancelamentos (motivo, feedback, within_guarantee)
🎨 Frontend
- CancellationWizard.jsx (1050+ linhas) com 5 steps
- Profile.jsx com nova seção de assinatura
- i18n completo em 3 idiomas (pt-BR, ES, EN)
- 40+ traduções específicas
🔧 Backend
- SubscriptionController: 4 novos métodos (eligibility, process, offer, execute)
- PayPalService: suspensão temporária de assinatura
- 2 novas tabelas: retention_offers, cancellations
- Email de retenção emotivo em Blade
⚖️ Legal
- 7 dias: cancelamento = reembolso total + acesso imediato termina
- Após 7 dias: cancelamento = acesso até fim do período, sem reembolso
- Grace period apropriado conforme período de garantia
- Removido README.md padrão do Laravel (backend)
- Removidos scripts de deploy (não mais necessários)
- Atualizado copilot-instructions.md para novo fluxo
- Adicionada documentação de auditoria do servidor
- Sincronizado código de produção com repositório
Novo workflow:
- Trabalhamos diretamente em /root/webmoney (symlink para /var/www/webmoney)
- Mudanças PHP são instantâneas
- Mudanças React requerem 'npm run build'
- Commit após validação funcional
- Redesigned all email templates with professional corporate style
- Created base layout with dark header, status cards, and footer
- Updated: subscription-cancelled, account-activation, welcome, welcome-new-user, due-payments-alert
- Removed emojis and gradients for cleaner look
- Added multi-language support (ES, PT-BR, EN)
- Fixed email delivery (sync instead of queue)
- Fixed PayPal already-cancelled subscription handling
- Cleaned orphan subscriptions from deleted users
- Criar tabela plans com Free, Pro Monthly, Pro Annual
- Criar tabela subscriptions com status e integração PayPal
- Criar tabela invoices com numeração sequencial WM-YYYY-NNNNNN
- Models: Plan, Subscription, Invoice com helpers
- User: hasActiveSubscription(), onTrial(), currentPlan(), etc.
- API: GET /api/plans (público)
- Seeder: PlansSeeder com 3 planos base
- Fase 2 do roadmap SaaS concluída
## New Features
- Email notifications for overdue and upcoming payments
- User preferences page for notification settings
- Daily scheduler to send alerts at user-configured time
- Smart analysis: payable items, transfer suggestions between accounts
## Backend
- Migration for user_preferences table
- SendDuePaymentsAlert Artisan command
- DuePaymentsAlert Mailable with HTML/text templates
- UserPreferenceController with test-notification endpoint
- Scheduler config for notify:due-payments command
## Frontend
- Preferences.jsx page with notification toggle
- API service for preferences
- Route and menu link for settings
- Translations (PT-BR, EN, ES)
## Server
- Cron configured for Laravel scheduler
Version: 1.44.5