mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* Add pkg/domain to just tidy * Remove sharedconfig package in order to make polling period purely an engine concern * Register plugins more explicitly in registry rather than relying on init() blocks at import time * Update connector templates * Start using pkg/domain imports for error and NewBasePlugin
873 B
873 B
Connector's base code generation
How to use
go build ./
sh connector-template.sh ../../internal/connectors/plugins/public <your_connector_name>
After generation, regenerate the plugin wiring files so the new connector is picked up at build time:
just compile-plugins
This script auto-discovers all directories under internal/connectors/plugins/public (CE) and ee/plugins (EE) and rewrites generated_ce.go / generated_ee.go accordingly — no manual edits to those files are needed.
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.