szvone/vmqApk

有个BUG

linwk24 opened this issue · 5 comments

支付宝付款方名字昵称带有阿拉伯数字时,会把昵称里是数字当成金额通知过去,导致真实金额订单失败。

我也遇到这个问题了,下面是一个修复方法
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;
}

图片

非常感谢 重新编译完美解决

你们用哪个版本的编译器。我老编译失败

cJ2PteKNjkVFo89

你们用哪个版本的编译器。我老编译失败

cJ2PteKNjkVFo89

缺少依赖吧??源码直接是编译不了的,得自己改改。
作者已经更新1.8版本了,应该没有这个BUG了。

  • v1.8.1(2019.12.20)

    • 修复上个版本无法正常回调问题
  • v1.8(2019.12.03)

    • 修复付款人昵称如果是纯数字,支付完后台订单金额会记录成昵称的数字的问题