Skip to content

Commit

Permalink
fix: 修复获取序列号的方式
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmetZC committed Nov 19, 2024
1 parent fc51794 commit abfd765
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static java.util.Objects.requireNonNull;

import com.wechat.pay.java.core.certificate.CertificateProvider;
import com.wechat.pay.java.core.util.PemUtil;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
Expand Down Expand Up @@ -134,6 +135,6 @@ public String getSerialNumber() {
}

requireNonNull(certificateProvider);
return certificateProvider.getAvailableCertificate().getSerialNumber().toString();
return PemUtil.getSerialNumber(certificateProvider.getAvailableCertificate());
}
}

0 comments on commit abfd765

Please sign in to comment.