refactored payment orchestration

This commit is contained in:
Stephan D
2026-02-03 00:40:46 +01:00
parent 05d998e0f7
commit 5e87e2f2f9
184 changed files with 3920 additions and 2219 deletions

View File

@@ -144,3 +144,24 @@ func (m *PaymentMethod) UnmarshalJSON(data []byte) error {
m.Data = raw
return nil
}
type PaymentStatus string
const (
PaymentStatusUnspecified PaymentStatus = "unspecified"
// Intent exists, no funds touched yet.
PaymentStatusCreated PaymentStatus = "created"
// Internal Sendico operations: holds, ledger, FX, fee calc.
PaymentStatusAuthorizing PaymentStatus = "authorizing"
// Funds are outside Sendico (rail/gateway/blockchain/provider).
// Observe lives ONLY in this state.
PaymentStatusExecuting PaymentStatus = "executing"
// Final states.
PaymentStatusSucceeded PaymentStatus = "success"
PaymentStatusFailed PaymentStatus = "failed"
PaymentStatusCancelled PaymentStatus = "cancelled"
)