Preskoči na sadržaj

E4-F8: Order Confirmation and Ticket Generation

Epic: E4: Ticket Purchase Flow

Size: M (Medium)

Problem / Outcome

Generate tickets and confirm order after payment.

Scope

In-Scope:

  • Order status update to COMPLETED
  • Ticket generation for each seat
  • Email confirmation with order details
  • Ticket delivery to user's app

Out-of-Scope:

  • Invoice generation (separate feature)

Acceptance Criteria

  • AC1: Given payment success, when order confirmed, then tickets generated with status SOLD
  • AC2: Confirmation email sent with order details
  • AC3: Tickets appear in user's "My Tickets" section

Data Model Impact

Order table:
- status = COMPLETED
- completed_at (TIMESTAMP)

Ticket table:
- id (UUID, PK)
- order_id (UUID, FK)
- match_id (UUID, FK)
- seat_id (UUID, FK)
- holder_name (VARCHAR)
- holder_oib (VARCHAR, encrypted)
- qr_code (VARCHAR)
- status (ENUM: sold)
- created_at (TIMESTAMP)

Permissions/Roles

  • System (triggered by payment)

How to Verify

npm test -- --grep "order confirmation"

Expected: Tickets created, email sent, app shows tickets.

Dependencies

Implementation Tasks

See E4: Ticket Purchase Tasks

Doc References


Last Updated: January 2026