参考微信开发品台文档中的paySign值: paySign = MD5(appId=wxd678efh567hg6787&nonceStr=5K8264ILTKCH16CQ2502SI8ZNMTM67VS&package=prepay_id=wx2017033010242291fcfe0db70013231072&signType=MD5&timeStamp=1490840662&key=qazwsxedcrfvtgbyhnujmikolp111111) = 22D9B4E54AB1950F51E0649E8810ACD6 签名中appId必须区
1 Dictionary<string, string> signDic = new Dictionary<string, string>(); 2 signDic.Add("appId", preOrder.appid);//appId中的I必须大写 3 signDic.Add("timeStamp", timeStamp.ToString()); 4 signDic.Add("nonceStr", nonceStr); 5 signDic.Add("package", package); 6 signDic.Add("signType", signType); 7 var sign = SmallUtil.GetSignString(signDic, smallConfig.wechatKey); 8 signDic.Add("paySign", sign);
Dictionary<string, string> signDic = new Dictionary<string, string>(); signDic.Add("appId", preOrder.appid);//appId中的I必须大写 signDic.Add("timeStamp", timeStamp.ToString()); signDic.Add("nonceStr", nonceStr); signDic.Add("package", package); signDic.Add("signType", signType); var sign = SmallUtil.GetSignString(signDic, smallConfig.wechatKey); signDic.Add("paySign", sign);
Dictionary<string, string> signDic = new Dictionary<string, string>(); signDic.Add("appId", preOrder.appid);//appId中的I必须大写 signDic.Add("timeStamp", timeStamp.ToString()); signDic.Add("nonceStr", nonceStr); signDic.Add("package", package); signDic.Add("signType", signType); var sign = SmallUtil.GetSignString(signDic, smallConfig.wechatKey); signDic.Add("paySign", sign);
//生成签名
Dictionary<string, string> signDic = new Dictionary<string, string>(); signDic.Add("appId", preOrder.appid);//appId中的I必须大写 signDic.Add("timeStamp", timeStamp.ToString()); signDic.Add("nonceStr", nonceStr); signDic.Add("package", package); signDic.Add("signType", signType); var sign = SmallUtil.GetSignString(signDic, smallConfig.wechatKey);
1 Dictionary<string, string> signDic = new Dictionary<string, string>(); 2 signDic.Add("appId", preOrder.appid);//appId中的I必须大写 3 signDic.Add("timeStamp", timeStamp.ToString()); 4 signDic.Add("nonceStr", nonceStr); 5 signDic.Add("package", package); 6 signDic.Add("signType", signType); 7 var sign = SmallUtil.GetSignString(signDic, smallConfig.wechatKey); 8 signDic.Add("paySign", sign);
signDic.Add("paySign", sign);
参考微信开发品台文档中的paySign值: paySign = MD5(appId=wxd678efh567hg6787&nonceStr=5K8264ILTKCH16CQ2502SI8ZNMTM67VS&package=prepay_id=wx2017033010242291fcfe0db70013231072&signType=MD5&timeStamp=1490840662&key=qazwsxedcrfvtgbyhnujmikolp111111) = 22D9B4E54AB1950F51E0649E8810ACD6 签名中appId必须区分大小写 //生成签名 Dictionary<string, string> signDic = new Dictionary<string, string>(); signDic.Add("appId", preOrder.appid);//appId中的I必须大写 signDic.Add("timeStamp", timeStamp.ToString()); signDic.Add("nonceStr", nonceStr); signDic.Add("package", package); signDic.Add("signType", signType); var sign = SmallUtil.GetSignString(signDic, smallConfig.wechatKey); signDic.Add("paySign", sign);