Merchant class

A class representing detailed information extracted from a Merchant QR Code.

This class provides various details encoded within a Merchant QR Code, including the Merchant PAN (Primary Account Number), Merchant ID, Merchant Name, Merchant Location, and other merchant-specific _raw information stored in the QR code's tags. Additionally, it provides utility methods for parsing and validating this information.

Key Fields:

  • _raw: A map containing the _raw data extracted from the QR code. Each tag within the map corresponds to a specific merchant detail, such as the Merchant PAN, ID, Name, etc.

Example usage:

final qrData = Merchant(someQrDataMap);
String? pan = qrData.pan;
String merchantName = qrData.name;

Constructors

Merchant(Map<String, dynamic> _raw)

Properties

acquirerName → String
Extracts and formats the Acquirer Name by removing common prefixes and non-alphanumeric characters.
no setter
checkPanDigit → int?
Retrieves the check digit from the PAN.
no setter
checkPanDigitVerbose → int?
Retrieves the check digit from the PAN with verbose logging.
no setter
hashCode → int
The hash code for this object.
no setterinherited
informations → Map<int, MerchantInformation>
Formats and retrieves specific Merchant Information tags (26, 27, 50, 51).
no setter
institutionCode → String?
Retrieves the National Institution Code derived from the Issuer's NNS.
no setter
issuerNns → String
Extracts the Issuer's National Numbering System (NNS) from the Primary Account Number (PAN).
no setter
location → MerchantLocation
Retrieves the Merchant's Location as a Map containing city, country code, and postal code.
no setter
merchantCriteria → MerchantCriteria
Retrieves the Merchant Criteria (MC) from the QR code data.
no setter
merchantId → String
Retrieves the Merchant ID (MID) from the QR code data.
no setter
merchantSequence → String?
Retrieves the Merchant Sequence from the PAN (Primary Account Number).
no setter
name → String
Retrieves the Merchant's Name from the QR code data.
no setter
nationalMerchantId → String
Retrieves the National Merchant ID from tag 51, sub tag 02.
no setter
pan → String
Retrieves the Merchant PAN (Primary Account Number) from the QR code data.
no setter
panMerchantMethod → PANMerchantMethod
Determines the Merchant Payment Method based on the 9th character of the PAN.
no setter
panWithCheckDigit → String
Retrieves the Merchant PAN (Primary Account Number) with the check digit appended.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isPanValid({bool checkLuhn = true}) → bool
Validates the Merchant PAN using the Luhn Algorithm.
isPanValidVerbose({bool checkLuhn = true}) → bool
Validates the Merchant PAN using the Luhn Algorithm with verbose logging.
logDebugMerchant() → void
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