改进 私钥文件
This commit is contained in:
parent
93a017702e
commit
c89cd67d0a
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,4 +20,4 @@ rr
|
|||||||
.rr.yaml
|
.rr.yaml
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/config/secrets
|
/config/secrets
|
||||||
config/secrets
|
config/secrets/*
|
||||||
|
@ -4,13 +4,20 @@
|
|||||||
|
|
||||||
use Yansongda\Pay\Pay;
|
use Yansongda\Pay\Pay;
|
||||||
|
|
||||||
|
$secret_file = env('ALIPAY_APP_SECERT_CERT_PATH', config_path('secrets/alipayAppPriv.key'));
|
||||||
|
if (!file_exists($secret_file)) {
|
||||||
|
$secret_file = '';
|
||||||
|
} else {
|
||||||
|
$secret_file = file_get_contents($secret_file);
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'alipay' => [
|
'alipay' => [
|
||||||
'default' => [
|
'default' => [
|
||||||
// 必填-支付宝分配的 app_id
|
// 必填-支付宝分配的 app_id
|
||||||
'app_id' => env('ALIPAY_APP_ID'),
|
'app_id' => env('ALIPAY_APP_ID'),
|
||||||
// 必填-应用私钥 字符串或路径
|
// 必填-应用私钥 字符串或路径
|
||||||
'app_secret_cert' => trim(file_get_contents(config_path('secrets/alipayAppPriv.key'))),
|
'app_secret_cert' => $secret_file,
|
||||||
// 必填-应用公钥证书 路径
|
// 必填-应用公钥证书 路径
|
||||||
'app_public_cert_path' => config_path('secrets/appCertPublicKey.crt'),
|
'app_public_cert_path' => config_path('secrets/appCertPublicKey.crt'),
|
||||||
// 必填-支付宝公钥证书 路径
|
// 必填-支付宝公钥证书 路径
|
||||||
|
Loading…
Reference in New Issue
Block a user