processString method

CreditCardModel? processString(
  1. String text
)

Processes the given text to extract credit card information.

Returns a CreditCardModel containing the extracted information, or null if not all required information is found.

Implementation

CreditCardModel? processString(String text) {
  // Check for expiration date
  processDate(text);

  // Check for card number
  processNumber(text);

  // Check for cardholder's name
  processName(text);

  return getCreditCardModel();
}