GatewayTransport class abstract

Provider-neutral HTTP transport interface used by the gateway-handoff layer.

Why an abstraction. The SDK package must remain free of dio / http / URLSession / OkHttp dependencies in its public contract so that:

  • the POS application can plug in whichever HTTP stack it already trusts (mTLS, custom interceptors, certificate pinning, ...),
  • unit tests can drop in a fake transport without any network plumbing,
  • swapping the underlying HTTP library never breaks the POS-facing API.

Implementations:

  • SHOULD honor the GatewayTransportRequest.timeout,
  • SHOULD set Content-Type: application/json on outbound requests (the SDK does not let the POS override this header to avoid mis-formatted requests),
  • MUST treat 2xx as success and any other status as a server-side failure surfaced via the response,
  • MUST NOT log the request body or the response body; both are sensitive (the request carries the encrypted payload, the response may carry a gateway-issued receipt reference).
Implementers

Constructors

GatewayTransport()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(GatewayTransportRequest request) → Future<GatewayTransportResponse>
Send request and resolve to a GatewayTransportResponse when the network call completes. Implementations should throw a TimeoutException or GatewayTransportError only for transport-level failures (DNS, TCP reset, TLS handshake, request timeout). HTTP errors (4xx / 5xx) are returned as a normal response with the appropriate statusCode.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited