TransactionCoordinatorOutcome class
Outcome of one TransactionCoordinator.runTransaction call.
Wraps:
- the canonical TransactionResult (the model the POS
already consumes; status reflects the gateway verdict
or
unknownwhen no gateway ran), - a coordinator-level kind that disambiguates the path taken (handoff vs payload-only vs failure),
- optional gatewayResponse / gatewayError for the handoff path,
- the optional readerError for the native-failure path.
completed != approved. The coordinator emits
gatewayApproved only when GatewayHandoffResponse.status
is GatewayHandoffStatus.approved; a
GatewayHandoffStatus.declined response becomes
gatewayDeclined, and a transport failure becomes
gatewayFailed. The wrapped TransactionResult.status
mirrors that distinction.
Security. The encrypted payload bytes are NOT carried
on this object. They are available on the SDK's unified
event stream (encryptedPayloadReady) and as a redacted-
in-toString field on TransactionResult.gatewayResponse
when the gateway returned one.
Constructors
- TransactionCoordinatorOutcome({required TransactionCoordinatorOutcomeKind kind, required TransactionResult transactionResult, GatewayHandoffResponse? gatewayResponse, GatewayError? gatewayError, ReaderError? readerError})
-
const
Properties
- gatewayError → GatewayError?
-
Structured gateway-layer error.
nullunless kind isgatewayFailed.final - gatewayResponse → GatewayHandoffResponse?
-
Gateway response when the handoff produced one.
nullinpayloadOnlymode and ongatewayFailed/readerFailed/cancelled/timedOutpaths.final - hasEncryptedPayload → bool
-
Convenience: did the reader successfully capture an
encrypted payload? True for
payloadCapturedOnlyand for everygatewayXxxoutcome (the handoff implies a payload was captured first).no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isApproved → bool
-
Convenience: did the cardholder's account get charged?
The only
truepath is TransactionCoordinatorOutcomeKind.gatewayApproved. The SDK does NOT claim approval otherwise.no setter - kind → TransactionCoordinatorOutcomeKind
-
Path discriminator.
final
- readerError → ReaderError?
-
Structured reader-layer error.
nullunless kind isreaderFailed/cancelled/timedOut, and even then only when the native layer surfaced a structured error.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transactionResult → TransactionResult
-
Canonical transaction result for the POS to consume.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
toString is intentionally terse and never leaks
gateway / reader-error message contents through the
underlying types' own (already-redacted)
toStrings.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited