Skip to content

商家转账回调报错,版本4.7.4B #3545

Description

@liuyn001

简要描述

商家转账回调的接口报错

模块版本情况

  • WxJava 模块名: weixin-java-pay
  • WxJava 版本号: 4.7.4B

详细描述

4.7.3B运行正常,升级到v4.7.4B报错,排查原因发现新版本代码调整了WxPayConfig中的getVerifier()方法,其中Verifier:certificatesVerifier的初始化判定逻辑是
“if (this.getPrivateCertPath() != null && this.getPrivateKeyPath() != null) {” 这样存在不是通过服务器文件初始化的方式,这两个属性为空,导致Verifier空指针,是否调整为 “if (this.getPrivateCertContent() != null && this.getPrivateKeyContent() != null) {” 更为合适

日志

java.lang.NullPointerException: Cannot invoke "com.github.binarywang.wxpay.v3.auth.Verifier.verify(String, byte[], String)" because the return value of "com.github.binarywang.wxpay.config.WxPayConfig.getVerifier()" is null
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.verifyNotifySign(BaseWxPayServiceImpl.java:362)
at com.github.binarywang.wxpay.service.impl.BaseWxPayServiceImpl.baseParseOrderNotifyV3Result(BaseWxPayServiceImpl.java:378)
at com.github.binarywang.wxpay.service.impl.TransferServiceImpl.parseTransferBillsNotifyResult(TransferServiceImpl.java:125)
at com.liduoma.lmp.core.goods.service.WxPayMerchantTransferService.transferBillsNotify(WxPayMerchantTransferService.java:90)

日志请写于此处

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions