Default Changelist

This commit is contained in:
xl
2023-11-07 15:59:17 +08:00
parent d0a6787b85
commit a2dc66ec84
2 changed files with 37 additions and 1 deletions
+36
View File
@@ -116,6 +116,10 @@ class Config
private string $ssl_ca = ''; private string $ssl_ca = '';
private int $port = 443; private int $port = 443;
private string $mchCert = '';
private string $mchKey = '';
/** /**
* @var string * @var string
*/ */
@@ -124,6 +128,38 @@ class Config
private string $agent = ''; private string $agent = '';
private bool $usrSwoole = false; private bool $usrSwoole = false;
/**
* @return string
*/
public function getMchCert(): string
{
return $this->mchCert;
}
/**
* @param string $mchCert
*/
public function setMchCert(string $mchCert): void
{
$this->mchCert = $mchCert;
}
/**
* @return string
*/
public function getMchKey(): string
{
return $this->mchKey;
}
/**
* @param string $mchKey
*/
public function setMchKey(string $mchKey): void
{
$this->mchKey = $mchKey;
}
/** /**
* @return string * @return string
*/ */
+1 -1
View File
@@ -56,7 +56,7 @@ trait WxV3PaymentTait
*/ */
public function openssl_signature($body): string public function openssl_signature($body): string
{ {
$pem = file_get_contents($this->getConfig()->getSslCert()); $pem = file_get_contents($this->getConfig()->getMchKey());
$mch_private_key = openssl_get_privatekey($pem); $mch_private_key = openssl_get_privatekey($pem);