adityanandanx / adityanandanx/raftaar
10. Trip Receipts & Email Notifications
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## Parent PRD
#1
## What to build
Receipt generation and delivery after trip completion. After payment is charged, an itemized receipt is generated and sent to customer via email. Receipt includes trip details (start/end station, duration, cost breakdown), and acts as proof of payment.
Implements receipt template, email composition (mocked provider), async background job, and frontend receipt display.
## Acceptance criteria
- [ ] `POST /trips/send-receipt` generates and emails receipt (internal, async job after charge)
- [ ] Email template includes: trip_id, start_station, end_station, start_time, end_time, duration_minutes, cost breakdown (base fare + per-minute charges)
- [ ] Cost breakdown shows: Base fare ₹2, Per-minute (if applicable), Total cost
- [ ] Mock email provider (no real SMTP): log to console/file
- [ ] Receipt sent within 1 minute of trip completion
- [ ] `GET /trips/:id/receipt` returns receipt data as JSON
- [ ] Database updates: trip.receipt_sent_at = now()
- [ ] Frontend: Receipt screen shown after trip end with all details
- [ ] Frontend: Download receipt button (PDF export optional for MVP)
- [ ] Frontend: "Receipt sent to [email]" confirmation message
- [ ] Edge cases: email send failure (retry logic), customer has no email (optional)
- [ ] All emails logged for audit (admin can see email sent records)
## Blocked by
- Blocked by #9 (Trip Charging - receipt sent after charge succeeds)
## User stories addressed
- User story 15: Itemized receipt after each trip
- User story 24: Email notification with proof of transaction
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.