Files
meet-hub/supabase/config.toml
dwindown 01579ac299 Refactor payment flow to use database triggers (Clean Architecture)
BREAKING CHANGE: Complete refactor of payment handling

New Architecture:
1. pakasir-webhook (120 lines -> was 535 lines)
   - Only verifies signature and updates order status
   - Removed: SMTP, email templates, notification logic

2. Database Trigger (NEW)
   - Automatically fires when payment_status = 'paid'
   - Calls handle-order-paid edge function
   - Works for webhook AND manual admin updates

3. handle-order-paid (NEW edge function)
   - Grants user access for products
   - Creates Google Meet events for consulting
   - Sends notifications via send-email-v2
   - Triggers webhooks

Benefits:
- Single Responsibility: Each function has one clear purpose
- Trigger works for both webhook and manual admin actions
- Easier to debug and maintain
- Reusable notification system

Migration required: Run 20241223_payment_trigger.sql

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 16:59:13 +07:00

44 lines
688 B
TOML

project_id = "lovable"
[api]
enabled = true
port = 54321
schemas = ["public", "graphql_public"]
extra_search_path = ["public", "extensions"]
max_rows = 1000
[db]
port = 54322
major_version = 15
[studio]
enabled = true
port = 54323
[functions.pakasir-webhook]
verify_jwt = false
[functions.send-test-email]
verify_jwt = false
[functions.create-meet-link]
verify_jwt = true
[functions.create-google-meet-event]
verify_jwt = false
[functions.handle-order-paid]
verify_jwt = false
[functions.send-consultation-reminder]
verify_jwt = false
[functions.send-notification]
verify_jwt = false
[functions.daily-reminders]
verify_jwt = false
[functions.send-email-v2]
verify_jwt = false