From 1a85804762e5d83a81a11b0497bb60858d96e183 Mon Sep 17 00:00:00 2001 From: lq Date: Tue, 3 Dec 2024 08:28:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=9A=84=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/config/params-local.php | 2 +- common/services/EplPayService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);