src/Common/CreditCard.php
protected function getTrackByPattern($pattern)
    {
        if ($tracks = $this->getTracks()) {
            if (preg_match($pattern, $tracks, $matches) === 1) {
                return $matches[0];
            }
        }
    }
protected function getTrackByPattern($pattern)
    {
        if ($tracks = $this->getTracks()) {
            if (preg_match($pattern, $tracks, $matches) === 1) {
                return $matches[0];
            }
        }
    }
Get raw data for a track  on the credit card magnetic strip based on the pattern for track 1 or 2.

@param $pattern
@return string|null