liyiorg / weixin-popular

微信SDK JAVA (公众平台、开放平台、 商户平台、 服务商平台)
Apache License 2.0
2.5k stars 1.06k forks source link

PayUtil签名获取nonce_str有Bug #162

Closed chenshukun7 closed 6 years ago

chenshukun7 commented 6 years ago

map.put("nonce_str", UUID.randomUUID().toString().replace("-", "")); replace("-", "")方法只能替换一次字符"-",UUID其他的字符"-"没有被替换成"",导致nonce_str长度过长。 应将replace()改为replaceAll("-", "")

liyiorg commented 6 years ago

有这种情况发生!确认使用的jdk 版本是 1.7 以上吗?

chenshukun7 commented 6 years ago

1.6