$clientId, 'type' => $type, 'timestamp' => $timestamp ]; // $businessParams = [ // 'test1' => '1', // ]; ksort($params); $str = ''; foreach ($params as $key => $value) { if(is_array($value)) { $str .= $key.json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); continue; } $str .= $key. $value; } $str = $clientSecrent.$str.$clientSecrent; $signature = strtoupper(md5($str)); return $signature; } }