public function generateChecksum($obj = null, $secretCode = null,$isautocheckout = false)
    {
        $arr = array();
        if ($secretCode)
            array_push($arr, $secretCode);

        foreach ($obj as $val) {
            $insert = $val;

            if (is_bool($val)) {
                if ($isautocheckout) {
					$insert = ($val) ? 'True' : 'False';	// autocheckout function computes boolean checksum differently (first character uppercase)
				} else {
					$insert = ($val) ? 'true' : 'false';
				}
            }

            array_push($arr, $insert);
        }

        return sha1(implode("|", $arr));
    }