GatewayClient class abstract
Provider-neutral interface the SDK calls when it has an encrypted payload to hand off to the merchant backend.
Default behaviour: do nothing. The SDK ships in GatewayMode.payloadOnly by default, in which case it never instantiates a GatewayClient at all - the encrypted payload reaches the POS through the unified event stream and the POS handles the backend call itself.
gatewayHandoff behaviour. When the POS opts into
GatewayMode.gatewayHandoff, it supplies a
GatewayClientFactory that builds one client per
initialize call. The SDK then calls
GatewayClient.send once per encrypted-payload event.
Implementations MUST:
- resolve their
Futurewith a GatewayHandoffResponse on any backend outcome the gateway accepted (approve, decline, pending), - throw a GatewayError for transport-level failures
(network, timeout, parse). The SDK translates the
thrown error into the appropriate
gatewayHandoffFailedevent.
Implementations MUST NOT:
- decrypt the encrypted payload (the SDK does not have the keys; neither should the POS-side client),
- retry on the cardholder's behalf (the SDK's own retry loop handles transient transport failures and is deliberately conservative),
- persist the request or response anywhere - this layer is transport only.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Release any resources the client holds (sockets, queues). Idempotent and safe to call concurrently with an in-flight send.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
GatewayTransactionRequest request) → Future< GatewayHandoffResponse> -
Send
requestand return a GatewayHandoffResponse. Throws GatewayError for any transport-level failure. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited