首页 > 微信 > 详细

已解决 微信小程序 "支付验证签名失败" 问题

时间:2019-08-31 20:42:48      阅读:1519      评论:0      收藏:0      [点我收藏+]
参考微信开发品台文档中的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);
View Code

 

//生成签名
                        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);

 

已解决 微信小程序 "支付验证签名失败" 问题

原文:https://www.cnblogs.com/lccsdncnblogs/p/11440133.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!