diff --git a/utils/alipay/mch_cert.go b/utils/alipay/mch_cert.go index 26e2e10..b27ab94 100644 --- a/utils/alipay/mch_cert.go +++ b/utils/alipay/mch_cert.go @@ -3,14 +3,13 @@ package alipay import ( "fmt" "io/ioutil" - "log" ) // getMchCertSN 提取证书序列号 func getMchCertSN(certPath string) (string, error) { certData, err := ioutil.ReadFile(certPath) if err != nil { - log.Fatalf("Failed to read the cert file: %s", err) + return "", fmt.Errorf("Failed to read the cert file: %s", err) } cert, err := getCert(certData)