private static function calculateChecksumMod10($content) {
        // Calculating Checksum
        // Consider the right-most digit of the message to be in an "odd" position,
        // and assign odd/even to each character moving from right to left
        // Odd Position = 3, Even Position = 1
        // Multiply it by the number
        // Add all of that and do 10-(?mod10)
        $odd = true;
        $checksumValue = 0;
        $c = strlen($content);

        for ($i = $c; $i > 0; $i--) {
            if ($odd === true) {
                $multiplier = 3;
                $odd = false;
            } else {
                $multiplier = 1;
                $odd = true;
            }

            $checksumValue += ($content[$i - 1] * $multiplier);
        }

        return (10 - $checksumValue % 10) % 10;
    }
private static function calculateChecksumMod10($content) {
        // Calculating Checksum
        // Consider the right-most digit of the message to be in an "odd" position,
        // and assign odd/even to each character moving from right to left
        // Odd Position = 3, Even Position = 1
        // Multiply it by the number
        // Add all of that and do 10-(?mod10)
        $odd = true;
        $checksumValue = 0;
        $c = strlen($content);

        for ($i = $c; $i > 0; $i--) {
            if ($odd === true) {
                $multiplier = 3;
                $odd = false;
            } else {
                $multiplier = 1;
                $odd = true;
            }

            $checksumValue += ($content[$i - 1] * $multiplier);
        }

        return (10 - $checksumValue % 10) % 10;
    }
private static function calculateChecksumMod10 ( $ content ) { // Calculating Checksum
 // Consider the right-most digit of the message to be in an "odd" position,
 // and assign odd/even to each character moving from right to left
 // Odd Position = 3, Even Position = 1
 // Multiply it by the number
 // Add all of that and do 10-(?mod10)
 $ odd = true ; $ checksumValue = 0 ; $ c = strlen ( $ content ) ; for ( $ i = $ c ; $ i > 0 ; $ i -- ) { if ( $ odd === true ) { $ multiplier = 3 ; $ odd = false ; } else { $ multiplier = 1 ; $ odd = true ; } $ checksumValue += ( $ content [ $ i - 1 ] * $ multiplier ) ; } return ( 10 - $ checksumValue % 10 ) % 10 ; }
Checksum Mod10.

@param int $content
@return int
Checksum Mod10 .