How itsofficialshrijan-svg/ozeats_payment_service works
OzEats Payment Service accepts payment API requests, validates and processes card or wallet payments, tracks payment status through authorization, capture, refund or payout, and stores payment records in memory. The main request path is server startup → Express app → payment routes → payment service → store. The service also simulates gateway authorization and calculates commission and restaurant/driver payouts; these behaviors are implemented together. The README documents the broader lifecycle and endpoints; no separate gateway or payout integration is shown in the sampled source.
Main entry points: paymentService.ts Payment Service · paymentRoutes.ts Payment Routes · app.ts Express App · store.ts In-memory Store
Components 7
HTTP Runtime
- HTTP Server
src/server.ts - Express App
src/app.ts - Payment Routes
src/routes/paymentRoutes.ts
Payment Domain
- Payment Service
src/services/paymentService.ts - Payment Contracts
src/types/payment.ts
Payment State
- In-memory Store
src/data/store.ts
Other components
- API Client
Connections 7
- API Client → Payment Routes: calls API
README.md - HTTP Server → Express App: starts
src/server.ts - Express App → Payment Routes: mounts
src/app.ts - Payment Routes → Payment Service: dispatches
src/routes/paymentRoutes.ts - Payment Service → In-memory Store: reads and writes
src/services/paymentService.ts - Payment Service → Payment Contracts: uses contracts
src/services/paymentService.ts - In-memory Store → Payment Contracts: stores payments
src/data/store.ts