Beispiel #1
0
        /// <summary>
        /// 生成要请求给支付宝的参数数组
        /// </summary>
        /// <param name="sParaTemp">请求前的参数数组</param>
        /// <param name="code">字符编码</param>
        /// <returns>要请求的参数数组字符串</returns>
        private static string BuildRequestParaToString(SortedDictionary <string, string> sParaTemp, Encoding code)
        {
            //待签名请求参数数组
            Dictionary <string, string> sPara = new Dictionary <string, string>();

            sPara = BuildRequestPara(sParaTemp);

            //把参数组中所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对参数值做urlencode
            string strRequestData = AlipayCore.CreateLinkStringUrlencode(sPara, code);

            return(strRequestData);
        }