GatewayMode enum

Mode that controls how the SDK delivers an encrypted card payload to the merchant's backend.

The SDK is intentionally not the gateway and not the processor. Both modes preserve the architectural rule that authorization, capture, void, refund, and settlement state live exclusively in the merchant's backend (em-api + Magensa for EasyMerchant customers, or any other PCI-scoped backend the POS app chooses).

The two modes simply differ in who opens the network connection to that backend:

  • GatewayMode.payloadOnly — the SDK emits the encrypted payload through the unified MobileReaderSdk.events stream and stops there. The POS application is responsible for taking that payload and POSTing it to its backend over its own HTTP stack. This is the default, and is the most PCI- conservative posture because the SDK does not need backend credentials at all.

  • GatewayMode.gatewayHandoff — the POS application hands the SDK a GatewayClient at initialize time; the SDK calls that client when an encrypted payload becomes available and emits gatewayHandoffStarted / gatewayHandoffCompleted / gatewayHandoffFailed events as the handoff progresses. The SDK still does NOT authorize; the GatewayClient implementation is the only code that talks to the backend, and the backend is the only code that talks to the processor.

In both modes:

  • the SDK never decrypts the payload,
  • the SDK never owns gateway credentials,
  • "the encrypted payload was captured" and "the gateway approved the transaction" are distinct events. The transactionCompleted / encryptedPayloadReady signal is about the reader; the approved / declined signal is about the gateway.

Wire names are stable; do not rename.

Inheritance
Available extensions

Values

payloadOnly → const GatewayMode
const GatewayMode('payload_only')
gatewayHandoff → const GatewayMode
const GatewayMode('gateway_handoff')

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wire → String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromWire(String? value) → GatewayMode

Constants

values → const List<GatewayMode>
A constant List of the values in this enum, in order of their declaration.