@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function register(?array $data = null): void |
| 19 | 19 | { |
| 20 | - $service = function () { |
|
| 20 | + $service = function() { |
|
| 21 | 21 | Pay::set(ParserInterface::class, CollectionParser::class); |
| 22 | 22 | |
| 23 | 23 | return new Wechat(); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function register(?array $data = null): void |
| 19 | 19 | { |
| 20 | - $service = function () { |
|
| 20 | + $service = function() { |
|
| 21 | 21 | Pay::set(ParserInterface::class, CollectionParser::class); |
| 22 | 22 | |
| 23 | 23 | return new Alipay(); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function register(?array $data = null): void |
| 31 | 31 | { |
| 32 | 32 | foreach ($this->detectApplication as $framework => $application) { |
| 33 | - if (class_exists($application) && $this->{$framework.'Application'}()) { |
|
| 33 | + if (class_exists($application) && $this->{$framework . 'Application'}()) { |
|
| 34 | 34 | return; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | protected function laravelApplication(): bool |
| 42 | 42 | { |
| 43 | - Pay::setContainer(function () { |
|
| 43 | + Pay::setContainer(function() { |
|
| 44 | 44 | return LaravelContainer::getInstance(); |
| 45 | 45 | }); |
| 46 | 46 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | protected function thinkApplication(): bool |
| 51 | 51 | { |
| 52 | - Pay::setContainer(function () { |
|
| 52 | + Pay::setContainer(function() { |
|
| 53 | 53 | return ThinkContainer::getInstance(); |
| 54 | 54 | }); |
| 55 | 55 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | return false; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - Pay::setContainer(function () { |
|
| 65 | + Pay::setContainer(function() { |
|
| 66 | 66 | return HyperfApplication::getContainer(); |
| 67 | 67 | }); |
| 68 | 68 | |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | return file_get_contents($key); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - return "-----BEGIN RSA PRIVATE KEY-----\n". |
|
| 60 | - wordwrap($key, 64, "\n", true). |
|
| 59 | + return "-----BEGIN RSA PRIVATE KEY-----\n" . |
|
| 60 | + wordwrap($key, 64, "\n", true) . |
|
| 61 | 61 | "\n-----END RSA PRIVATE KEY-----"; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | get_wechat_sign($params, $contents), |
| 150 | 150 | ); |
| 151 | 151 | |
| 152 | - return 'WECHATPAY2-SHA256-RSA2048 '.$auth; |
|
| 152 | + return 'WECHATPAY2-SHA256-RSA2048 ' . $auth; |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | $sign = $message->getHeaderLine('Wechatpay-Signature'); |
| 198 | 198 | $body = $message->getBody()->getContents(); |
| 199 | 199 | |
| 200 | - $content = $timestamp."\n".$random."\n".$body."\n"; |
|
| 201 | - $public = get_wechat_config($params)->get('wechat_public_cert_path.'.$wechatSerial); |
|
| 200 | + $content = $timestamp . "\n" . $random . "\n" . $body . "\n"; |
|
| 201 | + $public = get_wechat_config($params)->get('wechat_public_cert_path.' . $wechatSerial); |
|
| 202 | 202 | |
| 203 | 203 | if (empty($sign)) { |
| 204 | 204 | throw new InvalidResponseException(Exception::INVALID_RESPONSE_SIGN, '', ['headers' => $message->getHeaders(), 'body' => $body]); |