Default Changelist
This commit is contained in:
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user