chore(addon/huaweipay): 商家公钥不作为异常处理
This commit is contained in:
@@ -151,13 +151,13 @@ class HuaweiPayClient
|
||||
throw new \Exception('商户应用公钥证书文件不存在: ' . $this->config['public_key']);
|
||||
}
|
||||
$public_key_content = file_get_contents($public_key_path);
|
||||
} else {
|
||||
throw new \Exception('缺少必要配置:public_key或public_key_text');
|
||||
}
|
||||
|
||||
$this->public_key_certificate_instance = openssl_pkey_get_public($public_key_content);
|
||||
if (!$this->public_key_certificate_instance) {
|
||||
throw new \Exception('加载商户应用公钥证书失败,请检查证书格式是否正确');
|
||||
if (!empty($public_key_content)) {
|
||||
$this->public_key_certificate_instance = openssl_pkey_get_public($public_key_content);
|
||||
if (!$this->public_key_certificate_instance) {
|
||||
throw new \Exception('加载商户应用公钥证书失败,请检查证书格式是否正确');
|
||||
}
|
||||
}
|
||||
|
||||
// 加载华为平台支付证书
|
||||
|
||||
Reference in New Issue
Block a user