getConfig('Goopago'); $md5key = $config['SecretKey']; //md5密钥 $str = ''; foreach ( $data as $key => $val ) { if($val) $str .= $str ? '&' . $key . '=' . $val : $key . '=' . $val; } $str .= '&key=' . $md5key; return strtoupper(md5($str)); //拼接密钥后,md5加密后转为大写 } }