ProccessCreditCard class

A class that processes strings to extract credit card information.

Constructors

ProccessCreditCard({String cardNumber = "", String cardName = "", String cardExpirationMonth = "", String cardExpirationYear = "", bool useLuhnValidation = true, required bool checkCreditCardNumber, required bool checkCreditCardName, required bool checkCreditCardExpiryDate})
Creates a new instance of ProccessCreditCard.

Properties

cardExpirationMonth ↔ String
The extracted card expiration month.
getter/setter pair
cardExpirationYear ↔ String
The extracted card expiration year.
getter/setter pair
cardName ↔ String
The extracted cardholder name.
getter/setter pair
cardNumber ↔ String
The extracted credit card number.
getter/setter pair
checkCreditCardExpiryDate ↔ bool
Whether to check for a credit card expiry date.
getter/setter pair
checkCreditCardName ↔ bool
Whether to check for a cardholder name.
getter/setter pair
checkCreditCardNumber ↔ bool
Whether to check for a credit card number.
getter/setter pair
creditCardModel ↔ CreditCardModel?
The extracted credit card information.
getter/setter pair
fullExpiryDate → String
Returns the full expiry date in MM/YYYY format.
no setter
hashCode → int
The hash code for this object.
no setterinherited
numberTextList → List<String>
A list of 4-digit number strings, used to assemble the card number.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useLuhnValidation → bool
use Luhn algorithm to check if the number is valid
final

Methods

getCreditCardModel() → CreditCardModel?
Returns a CreditCardModel if all required information has been extracted.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processDate(String text) → String?
Attempts to extract the expiry date from the given text.
processName(String text) → String?
Attempts to extract the cardholder name from the given text.
processNumber(String number) → String?
Attempts to extract the credit card number from the given text.
processString(String text) → CreditCardModel?
Processes the given text to extract credit card information.
toString() → String
A string representation of this object.
inherited

Operators

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