调用jsapi缺少参数$key0$

<span style="font-family:Microsoft YaHei;font-size:14px;">	
var str = "appid=openId"+
			   "&body=xxx"+
			   "&mch_id=130456040111"+
			   "&nonce_str="+nonceStr+
			   "¬ify_url=http://xx.xx.com/pay/callBack.html"+
			   "&openid="+openId+
			   "&out_trade_no="+order_id+
			   "&spbill_create_ip=127.0.0.1"+
			   "&total_fee="+total_fee+
			   "&trade_type=JSAPI"+
			   "&key=jinxjinxjinxjinxjinxjinxjinxjinx";
	var md5 = CryptoJS.MD5(str).toString();</span>

以上是js文件;

<span style="font-family:Microsoft YaHei;font-size:14px;">      
  String xml =
                "<xml>"+
                   "<appid>"+WechatData.APP_ID+"</appid>"+
                   "<body>xxx</body>"+
                   "<mch_id>130456040111</mch_id>"+
                   "<nonce_str>"+nonce_str+"</nonce_str>"+
                   "<notify_url>http://xx.xx.com/pay/callBack.html</notify_url>"+
                   "<openid>"+openId+"</openid>"+
                   "<out_trade_no>"+orderId+"</out_trade_no>"+
                   "<spbill_create_ip>"+ip+"</spbill_create_ip>"+
                   "<total_fee>"+total_fee+"</total_fee>"+
                   "<trade_type>JSAPI</trade_type>"+
                   "<sign>"+sign.toUpperCase()+"</sign>"+
                "</xml> ";


</span>

以上是Java文件

对比上面每个参数是否都一致;尤其是body内容;其次就是查看两边数据编码格式是否一致;


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值