@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | return file_get_contents($key); |
62 | 62 | } |
63 | 63 | |
64 | - return "-----BEGIN RSA PRIVATE KEY-----\n". |
|
65 | - wordwrap($key, 64, "\n", true). |
|
64 | + return "-----BEGIN RSA PRIVATE KEY-----\n" . |
|
65 | + wordwrap($key, 64, "\n", true) . |
|
66 | 66 | "\n-----END RSA PRIVATE KEY-----"; |
67 | 67 | } |
68 | 68 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $sign = $message->getHeaderLine('Wechatpay-Signature'); |
165 | 165 | $body = (string) $message->getBody(); |
166 | 166 | |
167 | - $content = $timestamp."\n".$random."\n".$body."\n"; |
|
167 | + $content = $timestamp . "\n" . $random . "\n" . $body . "\n"; |
|
168 | 168 | $public = get_wechat_config($params)['wechat_public_cert_path'][$wechatSerial] ?? null; |
169 | 169 | |
170 | 170 | if (empty($sign)) { |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $wechatConfig = get_wechat_config($params); |
222 | 222 | |
223 | 223 | Pay::get(ConfigInterface::class)->set( |
224 | - 'wechat.'.get_tenant($params).'.wechat_public_cert_path', |
|
224 | + 'wechat.' . get_tenant($params) . '.wechat_public_cert_path', |
|
225 | 225 | ((array) ($wechatConfig['wechat_public_cert_path'] ?? [])) + ($certs ?? []), |
226 | 226 | ); |
227 | 227 | |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | } |
255 | 255 | |
256 | 256 | foreach ($config['wechat_public_cert_path'] as $serialNo => $cert) { |
257 | - file_put_contents($path.'/'.$serialNo.'.crt', $cert); |
|
257 | + file_put_contents($path . '/' . $serialNo . '.crt', $cert); |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | } |