收藏
回答

微信支付,申请退款

WXPayConfig 获取配置数据

private byte[] certData;

@PostConstruct
public void init() throws Exception {
    Resource resource = new ClassPathResource("cert/weixin/apiclient_cert.p12");
    try (InputStream certStream = resource.getInputStream()){
        this.certData = new byte[(int) resource.contentLength()];
        certStream.read(this.certData);
    }
}
@Override
protected InputStream getCertStream() {
    ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
    return certBis;
}


支付的时候报错:

DerInputStream.getLength(): lengthTag=111, too big.

回答关注问题邀请回答
收藏

1 个回答

  • Mark
    Mark
    2022-04-20

    调用sdk:

    wxPay.refund(refundReqDataMap);
    


    2022-04-20
    有用 1
    回复
登录 后发表内容