|
|
@@ -30,15 +30,18 @@ class WechatPayBuilder extends Facade
|
|
|
{
|
|
|
|
|
|
if ($this->builderChainable === null) {
|
|
|
- $this->builderChainable = Builder::factory([
|
|
|
+ $config = [
|
|
|
'mchid' => $this->config->mchid,
|
|
|
'serial' => $this->config->serial_no,
|
|
|
'privateKey' => $this->config->apiclient_key,
|
|
|
'certs' => [
|
|
|
- $this->config->platform_no => $this->config->platform_cert,
|
|
|
$this->config->public_key_id => $this->config->public_key,
|
|
|
],
|
|
|
- ]);
|
|
|
+ ];
|
|
|
+ if ($this->config->platform_no) {
|
|
|
+ $config['certs'][$this->config->platform_no] = $this->config->platform_cert;
|
|
|
+ }
|
|
|
+ $this->builderChainable = Builder::factory($config);
|
|
|
}
|
|
|
return $this->builderChainable;
|
|
|
}
|