有个BUG
linwk24 opened this issue · 5 comments
linwk24 commented
支付宝付款方名字昵称带有阿拉伯数字时,会把昵称里是数字当成金额通知过去,导致真实金额订单失败。
huangfengye commented
我也遇到这个问题了,下面是一个修复方法
NeNotificationService2.java 里面,把getMoney方法改成下面的样子就可以了。
public static String getMoney(String content){ int xnzf_index,y_index; int index = content.indexOf("]"); if (index!=-1){ content = content.substring(index+1); } xnzf_index=content.lastIndexOf("款"); y_index =content.lastIndexOf("元"); content = content.substring(xnzf_index,y_index); Pattern p = Pattern.compile("([0-9]\\d*\\.?\\d*)|(0\\.\\d*[0-9])"); Matcher m = p.matcher(content); boolean result = m.find(); String find_result = null; if (result) { find_result = m.group(1); } return find_result; }
linwk24 commented
非常感谢 重新编译完美解决
2675553 commented
huangfengye commented
szvone commented
-
v1.8.1(2019.12.20)
- 修复上个版本无法正常回调问题
-
v1.8(2019.12.03)
- 修复付款人昵称如果是纯数字,支付完后台订单金额会记录成昵称的数字的问题