TransactionResponse class

Result of a transaction request (payment, refund, pre-auth, capture, void, AVT) or of a transaction-status (v2) query.

A response object is returned even when a payment is declined: declines are signalled by isApproved being false (i.e. responseCode != "0"), not by an exception. Exceptions are only thrown for HTTP/transport errors.

Constructors

TransactionResponse({required Map<String, dynamic> raw, String? transactionId, String? originalTransactionId, String? tid, String? receipt, String? approvalCode, String? reference, String? transactionDate, String? cardNumber, String? cardExpiry, String? brand, String? cardIssuer, String? transactionType, String? currency, num? amount, num? tip, String? responseCode, String? responseText, Cvm? cvm, String? bin, String? statusCode, String? statusText, String? state, bool? cleared, String? source, String? approvalDate, String? actionCode, String? aid, String? vu})
const
TransactionResponse.fromJson(Map<String, dynamic> json)
factory

Properties

actionCode String?
Action code. Status v2 only.
final
aid String?
EMV Application Identifier. Status v2 only.
final
amount num?
Transaction amount.
final
approvalCode String?
Authorization / approval code.
final
approvalDate String?
Approval date. Status v2 only.
final
bin String?
BIN — the first 6 digits of the PAN.
final
brand String?
Card brand, e.g. Visa, MasterCard, Maestro.
final
cardExpiry String?
Card expiry, format YYMM.
final
cardIssuer String?
Card issuer.
final
cardNumber String?
Masked card number (PAN).
final
cleared bool?
Whether the transaction has already been cleared. Status v2 only.
final
currency String?
Currency (ISO 4217 alpha), e.g. EUR.
final
cvm Cvm?
Cardholder verification method.
final
hashCode int
The hash code for this object.
no setterinherited
isApproved bool
true when the transaction was approved (responseCode == "0").
no setter
isInProgress bool
true when a status query reports the transaction is still running (responseCode == null).
no setter
originalTransactionId String?
Identifier of the original transaction (for capture / refund / void).
final
raw Map<String, dynamic>
The raw decoded JSON, for fields not modelled explicitly.
final
receipt String?
Receipt number.
final
reference String?
Reference echoed from the request (null if none was sent).
final
responseCode String?
Response code. "0" means approved. null (status v2 only) means the transaction is still in progress — see isInProgress.
final
responseText String?
Human readable response text.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String?
What triggered the transaction, e.g. API, ECR. Status v2 only.
final
state String?
Transaction state, e.g. OK, VOID, FAILED. Status v2 only.
final
statusCode String?
Mapped status code (from HOC). Status v2 only.
final
statusText String?
Mapped status text (from HOC). Status v2 only.
final
tid String?
Terminal identifier.
final
tip num?
Tip amount.
final
transactionDate String?
Transaction date/time as returned by the terminal.
final
transactionId String?
Unique transaction identifier (echoed / generated). Store this to later void or query the transaction.
final
transactionType String?
Transaction type, e.g. SELL, PREAUTH, CAPTURE, VOID, REFUND.
final
vu String?
Merchant id (Vertragsunternehmen). Status v2 only.
final

Methods

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

Operators

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