refactored payment orchestration
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user