5 Commits

Author SHA1 Message Date
Krystie 62ccbbe93d Add Stripe event deduplication to prevent duplicate notifications
- Added PROCESSED_EVENTS_FILE to track processed Stripe event IDs
- Added is_event_processed() to check if an event was already handled
- Added mark_event_processed() to record processed events
- Webhook handler now checks for duplicate events before processing
- _process_checkout_session marks event as processed immediately
- Duplicate events now return {'status': 'duplicate'} instead of reprocessing

Fixes phantom notification bug where Stripe retry webhooks caused duplicate Telegram messages.
2026-05-25 17:13:29 -07:00
Krystie 7328d49d81 Fix: pass payment_method to generate_receipt (Stripe)
The generate_receipt() function in fjccv_webhook.py now accepts and passes payment_method to generate_receipt.py.
2026-05-25 03:18:53 -07:00
Krystie c53f831b3c Fix: remove payment_method argument from generate_receipt() call
The generate_receipt() function doesn't accept a payment_method parameter, causing all donations to fail silently. Removed the extra argument.
2026-05-25 02:55:20 -07:00
Krystie b5ef6e1507 Remove approval queue, add Telegram notifications
- Removed APPROVAL_QUEUE_DIR and send_approval_queue() function
- Removed approval queue file creation
- Added send_telegram_notification() for real-time donation alerts
- Telegram message includes: donor name, amount, receipt number, transaction ID
- Payment going through = approval enough. No more manual approval needed.
2026-05-25 02:35:32 -07:00
Krystie cbb839c3b5 Initial commit: FJCCV Stripe webhook server
- Handles checkout.session.completed events from Stripe
- Auto-generates PDF donation receipts
- Uploads receipts to Sami-PC and Dropbox
- Updates Excel ledger automatically
- Sends receipt emails automatically (AUTO_EMAIL=true)
- Creates approval queue entries for donation tracking
2026-05-25 02:27:21 -07:00