mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
Add network-scoped symbol resolution (e.g. BASEUSDC → USDC) to handle Coinbase Prime assets that expose network aliases. Introduce thread-safe lazy loading of currencies via sync.Mutex with double-checked locking pattern (ensureCurrencies). Document gross amount convention across models and connector template.
Connector's base code generation
How to use
go build ./
sh connector-template.sh ../../internal/connectors/plugins/public <your_connector_name>
Amount convention
All payment amounts (PSPPayment.Amount) must use the gross convention:
report the full amount as returned by the PSP before any fee deduction.
PSP fees should be stored in metadata (e.g. fees, network_fees) but never
subtracted from the amount field. This ensures consistent reconciliation
across connectors.