merchantSequence property
String?
get
merchantSequence
Retrieves the Merchant Sequence from the PAN (Primary Account Number).
The Merchant Sequence is extracted from the 9th character (index 8) to the second-to-last character
of the PAN. If the PAN is too short (less than 9 characters) or empty, it returns null
.
Returns:
- The Merchant Sequence as a string, or
null
if the PAN is too short or empty.
Example:
String? sequence = QRISMPM(qrData).merchant.merchantSequence;
print(sequence); // "860000000042" or null
Implementation
String? get merchantSequence {
if (pan.isNotEmpty && pan.length > 9) {
return pan.substring(8, pan.length - 1);
}
return null;
}