lib/AktiveMerchant/Billing/Gateway.php
protected function cc_format($number, $options)
    {
        if (empty($number)) {
            return '';
        }

        switch ($options) {
            case 'two_digits':
                $number = sprintf("%02d", $number);
                return substr($number, -2);
                break;
            case 'four_digits':
                return sprintf("%04d", $number);
                break;
            default:
                return $number;
                break;
        }
    }
protected function cc_format($number, $options)
    {
        if (empty($number)) {
            return '';
        }

        switch ($options) {
            case 'two_digits':
                $number = sprintf("%02d", $number);
                return substr($number, -2);
                break;
            case 'four_digits':
                return sprintf("%04d", $number);
                break;
            default:
                return $number;
                break;
        }
    }
protected function cc_format ( $ number , $ options ) { if ( empty ( $ number ) ) { return '' ; } switch ( $ options ) { case 'two_digits' : $ number = sprintf ( "%02d" , $ number ) ; return substr ( $ number , - 2 ) ; break ; case 'four_digits' : return sprintf ( "%04d" , $ number ) ; break ; default : return $ number ; break ; } }
Formats values from a credit card.

Used to format mont or year values to 2 or 4 digit numbers.

@param integer $number  The number to format
@param string  $options 'two_digits' or 'four_digits'

@return string
Formats values from a credit card .