private string GetPaySign(WeixinPayInfo payInfo, string paySignKey)
 {
     SortedDictionary<string, string> sParams = new SortedDictionary<string, string>();
     sParams.Add("appId", payInfo.AppId);
     sParams.Add("timeStamp", payInfo.TimeStamp);
     sParams.Add("nonceStr", payInfo.NonceStr);
     sParams.Add("package", payInfo.Package);
     sParams.Add("signType", "MD5");
     return WeixinPayUtil.GetSign(sParams, paySignKey);
 }
 public WeixinPayInfo GetPayInfo(string ip)
 {
     WeixinPayInfo payInfo = new WeixinPayInfo();
     payInfo.AppId = "xxx";
     payInfo.NonceStr = WeixinPayUtil.GetNoncestr();
     payInfo.TimeStamp = WeixinPayUtil.GetTimestamp();
     payInfo.Package = "prepay_id=" + GetPrePayId(ip);
     payInfo.PaySign = GetPaySign(payInfo, "paySignKey");
     return payInfo;
 }