saman-payment-pos
    Preparing search index...

    Type Alias Ssp1126ClientOptions

    Ssp1126ClientOptions: TransportConfig & {
        componentVersion?: string;
        currency?: string;
        firstAckTimeoutMs?: number;
        logger?: (line: string) => void;
        minReconnectGapMs?: number;
        reconnectGapAfterPartialMs?: number;
        retryDelayMs?: number;
        retryOnFirstTimeout?: boolean;
        verifyMac?: boolean;
    }

    Client options. Pick a channel via the transport config: the default (or transport: 'tcp') uses { host, port? }; transport: 'serial' uses { path, baudRate? }.

    Type Declaration

    • OptionalcomponentVersion?: string

      Component version reported in DE57 for purchases. Default "1.4.3.0".

    • Optionalcurrency?: string

      Currency code (DE49). Default "364" (IRR).

    • OptionalfirstAckTimeoutMs?: number

      Timeout (ms) for the first response of a transaction — the 15 acknowledgement. Default 3000.

      The terminal answers this in 3–5 ms when it is going to answer at all (measured over many runs); a longer wait only delays discovering that it is not listening. Note this covers the 15 only — the terminal sends it immediately and then takes its time waiting for a card, so a short value here does not cut a customer's card window short. Later steps keep their own, much longer timeouts.

    • Optionallogger?: (line: string) => void

      Optional logger for raw frames / steps.

    • OptionalminReconnectGapMs?: number

      Minimum time (ms) to wait before opening a new connection when the previous transaction ended cleanly — i.e. the terminal sent its final 17 (EOT). Reconnect sooner and the terminal accepts the TCP connection but never answers the first request.

      Default 500. Measured against a live terminal (firmware 10.063.00PO): 0 ms and 250 ms stalled, 500 ms and above did not.

    • OptionalreconnectGapAfterPartialMs?: number

      Minimum reconnect gap after a transaction that ended without a final 17getAuthorizedOperations(), totalReport(), report() and any failed flow. These leave the terminal needing noticeably longer to be ready again.

      Default 1500. Measured on the same terminal by running getAuthorizedOperations() then a connection test: 500 ms and 1000 ms both stalled (~12–13 s end to end), while 1500 ms and above completed in ~3 s with no stall.

    • OptionalretryDelayMs?: number

      Delay before the reconnect attempt described above. Default 500.

    • OptionalretryOnFirstTimeout?: boolean

      If the very first response of a transaction times out on a freshly-opened connection, close it, wait retryDelayMs, reconnect, and resend the opening request exactly once before giving up. This is a self-adapting alternative (or complement) to minReconnectGapMs for terminals that occasionally aren't ready to service a connection immediately after the previous one closed. Default true.

    • OptionalverifyMac?: boolean

      Verify the DE64 MAC on incoming messages. Default true.