@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $result = $this->getCertSn($ssl['issuer'] ?? [], $ssl['serialNumber'] ?? ''); |
| 118 | 118 | |
| 119 | - Pay::get(ConfigInterface::class)->set('alipay.'.$tenant.'.app_public_cert_sn', $result); |
|
| 119 | + Pay::get(ConfigInterface::class)->set('alipay.' . $tenant . '.app_public_cert_sn', $result); |
|
| 120 | 120 | |
| 121 | 121 | return $result; |
| 122 | 122 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | continue; |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - $ssl = openssl_x509_parse($cert.'-----END CERTIFICATE-----'); |
|
| 149 | + $ssl = openssl_x509_parse($cert . '-----END CERTIFICATE-----'); |
|
| 150 | 150 | |
| 151 | 151 | if (false === $ssl) { |
| 152 | 152 | throw new InvalidConfigException(Exception::ALIPAY_CONFIG_ERROR, 'Invalid alipay_root_cert'); |
@@ -155,13 +155,13 @@ discard block |
||
| 155 | 155 | $detail = $this->formatCert($ssl); |
| 156 | 156 | |
| 157 | 157 | if ('sha1WithRSAEncryption' == $detail['signatureTypeLN'] || 'sha256WithRSAEncryption' == $detail['signatureTypeLN']) { |
| 158 | - $sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']).'_'; |
|
| 158 | + $sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']) . '_'; |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | $result = substr($sn, 0, -1); |
| 163 | 163 | |
| 164 | - Pay::get(ConfigInterface::class)->set('alipay.'.$tenant.'.alipay_root_cert_sn', $result); |
|
| 164 | + Pay::get(ConfigInterface::class)->set('alipay.' . $tenant . '.alipay_root_cert_sn', $result); |
|
| 165 | 165 | |
| 166 | 166 | return $result; |
| 167 | 167 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | protected function getCertSn(array $issuer, string $serialNumber): string |
| 170 | 170 | { |
| 171 | 171 | return md5( |
| 172 | - $this->array2string(array_reverse($issuer)).$serialNumber |
|
| 172 | + $this->array2string(array_reverse($issuer)) . $serialNumber |
|
| 173 | 173 | ); |
| 174 | 174 | } |
| 175 | 175 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $string = []; |
| 179 | 179 | |
| 180 | 180 | foreach ($array as $key => $value) { |
| 181 | - $string[] = $key.'='.$value; |
|
| 181 | + $string[] = $key . '=' . $value; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | return implode(',', $string); |