@@ -244,7 +244,7 @@ |
||
244 | 244 | |
245 | 245 | $name = ucfirst(str_replace(['-', '_', ''], '', $name)); |
246 | 246 | |
247 | - return __NAMESPACE__."\\Gateways\\{$name}Gateway"; |
|
247 | + return __NAMESPACE__."\\Gateways\\{$name}gateway"; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | const ENDPOINT_FORMAT = 'json'; |
36 | 36 | |
37 | - const ENDPOINT_REGION = '86'; // 中国区,目前只支持此国别 |
|
37 | + const ENDPOINT_REGION = '86'; // 中国区,目前只支持此国别 |
|
38 | 38 | |
39 | 39 | const SUCCESS_CODE = 200; |
40 | 40 |
@@ -154,7 +154,7 @@ |
||
154 | 154 | * 根据 指定的 keys 过滤应该参与签名的 header. |
155 | 155 | * |
156 | 156 | * @param array $headers |
157 | - * @param array $keys |
|
157 | + * @param string[] $keys |
|
158 | 158 | * |
159 | 159 | * @return array |
160 | 160 | */ |
@@ -56,7 +56,7 @@ |
||
56 | 56 | /** |
57 | 57 | * Make a post request with json params. |
58 | 58 | * |
59 | - * @param $endpoint |
|
59 | + * @param string $endpoint |
|
60 | 60 | * @param array $params |
61 | 61 | * @param array $headers |
62 | 62 | * |
@@ -98,7 +98,7 @@ |
||
98 | 98 | * |
99 | 99 | * @param string $appKey |
100 | 100 | * @param string $appSecret |
101 | - * @return array |
|
101 | + * @return string |
|
102 | 102 | */ |
103 | 103 | protected function getHeaders($appKey, $appSecret) |
104 | 104 | { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | protected function getEndpoint(Config $config) |
91 | 91 | { |
92 | 92 | $endpoint = rtrim($config->get('endpoint', self::ENDPOINT_HOST), '/'); |
93 | - return $endpoint . self::ENDPOINT_URI; |
|
93 | + return $endpoint.self::ENDPOINT_URI; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | { |
121 | 121 | $now = date('Y-m-d\TH:i:s\Z'); |
122 | 122 | $nonce = uniqid(); |
123 | - $passwordDigest = base64_encode(hash('sha256', ($nonce . $now . $appSecret))); |
|
123 | + $passwordDigest = base64_encode(hash('sha256', ($nonce.$now.$appSecret))); |
|
124 | 124 | return sprintf("UsernameToken Username=\"%s\",PasswordDigest=\"%s\",Nonce=\"%s\",Created=\"%s\"", |
125 | 125 | $appKey, $passwordDigest, $nonce, $now); |
126 | 126 | } |