diff --git a/common/config/params-local.php b/common/config/params-local.php index 1239db1..80d8000 100644 --- a/common/config/params-local.php +++ b/common/config/params-local.php @@ -116,7 +116,7 @@ JJvBfLfudYNUjUCyW3gAcOIJ 'customerCode' => '562795004029322', //商户号 'signNo' => '562795004029322004', //证书序列号 'password' => '907883', // 证书密码 - 'rsaPrivateKeyFilePath' => '/www/certs/user.pfx', //私钥文件路径 + 'rsaPrivateKeyFilePath' => '/www/certs/user-rsa.pfx', //私钥文件路径 'publicKeyFilePath' => '/www/certs/EFPS-PublicKey.cer', //公钥 'signType' => 'RSA2', 'pay_notify_url' => 'https://app.xiaokang88.com/member/v1/eplpay-callback/notify', diff --git a/common/services/EplPayService.php b/common/services/EplPayService.php index ceaa900..46bcb56 100644 --- a/common/services/EplPayService.php +++ b/common/services/EplPayService.php @@ -189,7 +189,7 @@ class EplPayService openssl_pkcs12_read(file_get_contents($this->eplConfig['rsaPrivateKeyFilePath']), $certs, $this->eplConfig['password']); //其中password为你的证书密码 if(!$certs){ - throw new Exception('请检查RSA私钥配置'); + throw new Exception('请检查RSA私钥配置'. openssl_error_string()); } openssl_sign($data, $sign, $certs['pkey'], OPENSSL_ALGO_SHA256);