How proxynth/payment-sandbox works
Payment Sandbox is a local payment-systems simulator, not a processor. Developers call its HTTP API to create and advance simulated payments, then inspect events, timelines, diagnostics, and asynchronous webhook outcomes; admin routes also support virtual time and scenario replay. The map preserves the payment, provider, durable-workflow, webhook, replay, and administration capabilities documented in the README. Edges are limited to visible calls and wiring; unsampled implementation details are not inferred.
Main entry points: app.go Application composition · application Payment use cases · handler.go Payment endpoints · http Admin controls
Components 23
HTTP runtime
- Application composition
internal/app/app.go - HTTP API server
internal/api/server.go
Payment simulation
- Payment endpoints
internal/payment/adapters/http/handler.go - Payment use cases
internal/payment/application - Payment lifecycle
internal/payment/domain - Payment storage
internal/payment/adapters/sqlite/repository.go - Payment event log
internal/payment/adapters/sqlite/event_log.go - Idempotency records
internal/idempotency/adapters/sqlite/repository.go - Provider profiles
internal/provider
Async execution
- Saga orchestration
internal/paymentworkflow/application/orchestrator.go - Saga state
internal/paymentworkflow/adapters/sqlite/repository.go - Durable scheduler
internal/scheduler/application - Scheduled jobs
internal/scheduler/adapters/sqlite/repository.go - Webhook endpoints
internal/webhook/adapters/http/handler.go - Webhook delivery
internal/webhook/application/deliver_callback.go - Webhook records
internal/webhook/adapters/sqlite/repository.go
Replay and administration
- Scenario replay
internal/replay/application - Admin controls
internal/administration/adapters/http - Timeline and diagnostics
internal/administration/application
Platform and persistence
- Virtual clock
internal/platform/clock - SQLite database
internal/platform/persistence/sqlite/database.go
Other components
- Developer
- Webhook receiver
Connections 26
- Developer → HTTP API server: calls HTTP
README.md - HTTP API server → Payment endpoints: routes requests
- Payment endpoints → Payment use cases: executes use cases
internal/payment/adapters/http/handler.go - Payment endpoints → Idempotency records: records retries
internal/payment/adapters/http/handler.go - Payment use cases → Payment storage: persists payments
- Payment use cases → Payment event log: records events
- Payment use cases → Payment lifecycle: applies lifecycle
- Application composition → HTTP API server: creates server
internal/app/app.go - Application composition → Payment endpoints: registers routes
internal/app/app.go - Application composition → Provider profiles: registers profiles
internal/app/app.go - Application composition → Scenario replay: builds replay service
internal/app/app.go - Application composition → Saga orchestration: builds executor
internal/app/app.go - Application composition → Saga state: creates repository
internal/app/app.go - Application composition → Durable scheduler: creates worker
internal/app/app.go - Application composition → Scheduled jobs: creates repository
internal/app/app.go - Application composition → Webhook delivery: configures callback
internal/app/app.go - Application composition → Webhook endpoints: registers routes
internal/app/app.go - Webhook endpoints → Webhook records: uses repository
internal/webhook/adapters/http/handler.go - Admin controls → Virtual clock: advances time
internal/administration/adapters/http/handler.go - Admin controls → Provider profiles: lists providers
internal/administration/adapters/http/handler.go - Application composition → Admin controls: registers admin routes
internal/app/app.go - Application composition → Timeline and diagnostics: wires inspection handlers
internal/app/app.go - Scenario replay → Provider profiles: runs scenarios
- Webhook delivery → Webhook receiver: sends callbacks
- Application composition → SQLite database: opens SQLite
internal/app/app.go - Application composition → Virtual clock: wires virtual time