How gmwalletapp/epusdt works
Epusdt is a self-hosted, multi-chain crypto payment gateway. A merchant submits a signed order through the HTTP API; the gateway reserves a wallet-and-amount combination and returns checkout details. Cashier actions can select a network or submit a transaction hash, while chain listeners detect transfers and match them to orders. Successful payments trigger notifications and asynchronous merchant callbacks. The graph also includes admin operations and chain configuration. Listener-to-processing links reflect the documented matching workflow; unsampled implementation details are not inferred.
Main entry points: data Data access · router.go HTTP routes · pay_controller.go Cashier endpoints · listen_chain_common.go Network scanners
Components 21
HTTP API
- HTTP routes
src/route/router.go - Order endpoints
src/controller/comm/order_controller.go - Cashier endpoints
src/controller/comm/pay_controller.go - Supported assets
src/controller/comm/supported_asset_controller.go
Payment lifecycle
- Order service
src/model/service/order_service.go - Payment service
src/model/service/pay_service.go - Manual verification
src/model/service/manual_payment_verify.go
Chain monitoring
- Chain listeners
src/task/listen.go - Network scanners
src/task/listen_chain_common.go - Transfer matching
src/model/service/task_service.go
Administration
- Admin controllers
src/controller/admin - Telegram bot
src/telegram/telegram.go
Persistence and delivery
- Notifications
src/notify/dispatcher.go - Callback worker
src/mq/worker.go - Data access
src/model/data - Database models
src/model/mdb - Configured database
src/model/dao
Other components
- Merchant app
- Payer
- Merchant callback URL
- Chain RPC/API
Connections 24
- Merchant app → HTTP routes: submits API request
- Payer → HTTP routes: uses cashier
- HTTP routes → Order endpoints: dispatches order routes
- HTTP routes → Cashier endpoints: dispatches payment routes
- HTTP routes → Supported assets: dispatches config route
- Order endpoints → Order service: creates transaction
- Cashier endpoints → Payment service: loads checkout
- Cashier endpoints → Manual verification: submits transaction hash
- Order service → Data access: reads and writes orders
- Payment service → Data access: reads and updates orders
- Manual verification → Data access: checks payment records
- Supported assets → Data access: reads enabled assets
- Chain listeners → Network scanners: starts scanners
- Network scanners → Chain RPC/API: reads chain transfers
- Network scanners → Transfer matching: processes transfer events
- Transfer matching → Data access: matches and updates orders
- Transfer matching → Notifications: dispatches payment notice
- Notifications → Telegram bot: sends Telegram notice
- Admin controllers → Data access: manages gateway records
- Data access → Database models: uses persistence models
- Database models → Configured database: queries configured store
- Callback worker → Data access: loads and updates callbacks
- Callback worker → Merchant callback URL: delivers payment callback
- Admin controllers → Callback worker: reopens callback delivery