先将标题翻译一下:把要发送的参数,封装成了一个类,参数为类的属性,但还是要对参数进行加密,或者筛选掉一些不要的参数,最后把参数重组成带&、=的字符串(参数1=value1&参数2=value2...)。这样做是为了能更好的处理参数,这是一个通用个方法,而不必用字符串相加的办法来组成参数字符串,也省去了筛选某些参数是用写死的办法来做。
<span style="white-space:pre"> </span>private static Dictionary<string, string> FilterPara(SortedDictionary<string, string> dicArrayPre, params string[] paras)
{
Dictionary<string, string> dict = new Dictionary<string, string>();
foreach (KeyValuePair<string, string> temp in dicArrayPre)
if (!paras.Contains(temp.Key) && !string.IsNullOrEmpty(temp.Value))
dict.Add(temp.Key, temp.Value);
return dict;
}
private static SortedDictionary<string, string> GetResultDictionary(ChangjiePayOutModel model)
{