[ 500 => 100004, 1000 => 100005 ] ]; const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8']; public static function sign($params) { ksort($params); $content = ''; foreach ($params as $key => $value) { if(self::check_empty($value) === false) { $content .= "{$key}{$value}"; } } $content .= config::KEY; return md5($content); } public static function check_empty($value) { if (!isset($value)) return true; if ($value === null) return true; if (trim($value) === "") return true; return false; } }