How herneto/receptor_prt works
This Elixir application bridges a PRT TCP session to a configured HTTP payment API. It opens a session, reads framed PRT requests, dispatches each through a pooled GenServer worker, and sends the configured field from the HTTP response back over the session. YAML supplies the PRT and API settings. The sampled source shows the request and response path; the README gives no further capability detail, and unsampled YAML contents are not assumed.
Main entry points: worker.ex HTTP worker · receptor_prt.ex Session and framing · application.ex Application supervisor · config.ex Config loader
Components 10
PRT Gateway
- Session and framing
lib/receptor_prt.ex - Request dispatch
lib/receptor_prt.ex - Response relay
lib/receptor_prt.ex - Application supervisor
lib/receptor_prt/application.ex
HTTP Bridge
- Worker pool
lib/receptor_prt/application.ex - HTTP worker
lib/poolboy_prt/worker.ex
Configuration
- Application YAML
receptor_app.yaml - Config loader
lib/receptor_prt/config.ex
Other components
- PRT peer
- Payment API
Connections 13
- PRT peer → Session and framing: sends frames
lib/receptor_prt.ex - Session and framing → PRT peer: opens session
lib/receptor_prt.ex - Session and framing → Request dispatch: dispatches request
lib/receptor_prt.ex - Request dispatch → Worker pool: checks out worker
lib/receptor_prt.ex - Request dispatch → HTTP worker: calls worker
lib/receptor_prt.ex - HTTP worker → Payment API: posts request
lib/poolboy_prt/worker.ex - HTTP worker → Response relay: sends response
lib/poolboy_prt/worker.ex - Response relay → PRT peer: writes response
lib/receptor_prt.ex - Application supervisor → Config loader: loads settings
lib/receptor_prt/application.ex - Config loader → Application YAML: reads YAML
lib/receptor_prt/config.ex - Application supervisor → Session and framing: starts session task
lib/receptor_prt/application.ex - Application supervisor → Worker pool: starts pool
lib/receptor_prt/application.ex - HTTP worker → Config loader: loads API settings
lib/poolboy_prt/worker.ex