@@ -50,8 +50,8 @@ |
||
50 | 50 | ->setPayload(array_merge( |
51 | 51 | [ |
52 | 52 | '_method' => 'POST', |
53 | - '_url' => 'v3/pay/transactions/out-trade-no/'.$outTradeNo.'/close', |
|
54 | - '_service_url' => 'v3/pay/partner/transactions/out-trade-no/'.$outTradeNo.'/close', |
|
53 | + '_url' => 'v3/pay/transactions/out-trade-no/' . $outTradeNo . '/close', |
|
54 | + '_service_url' => 'v3/pay/partner/transactions/out-trade-no/' . $outTradeNo . '/close', |
|
55 | 55 | ], |
56 | 56 | $data ?? $this->normal($config) |
57 | 57 | )); |
@@ -81,11 +81,11 @@ |
||
81 | 81 | if (Str::contains($body, '&-&')) { |
82 | 82 | $beginIndex = strpos($body, '&signType='); |
83 | 83 | $endIndex = strpos($body, '&-&'); |
84 | - $data = substr($body, 0, $beginIndex).substr($body, $endIndex); |
|
84 | + $data = substr($body, 0, $beginIndex) . substr($body, $endIndex); |
|
85 | 85 | |
86 | 86 | $signIndex = strpos($body, '&sign='); |
87 | 87 | $signature = substr($body, $signIndex + strlen('&sign='), $endIndex - ($signIndex + strlen('&sign='))); |
88 | - } else { |
|
88 | + }else { |
|
89 | 89 | $result = Arr::wrapQuery($body, true); |
90 | 90 | $result = Collection::wrap($result); |
91 | 91 | $signature = $result->get('sign'); |
@@ -51,8 +51,8 @@ |
||
51 | 51 | $rocket->setPayload(array_merge( |
52 | 52 | [ |
53 | 53 | '_method' => 'POST', |
54 | - '_url' => 'v3/pay/transactions/out-trade-no/'.$outTradeNo.'/reverse', |
|
55 | - '_service_url' => 'v3/pay/partner/transactions/out-trade-no/'.$outTradeNo.'/reverse', |
|
54 | + '_url' => 'v3/pay/transactions/out-trade-no/' . $outTradeNo . '/reverse', |
|
55 | + '_service_url' => 'v3/pay/partner/transactions/out-trade-no/' . $outTradeNo . '/reverse', |
|
56 | 56 | ], |
57 | 57 | $data ?? $this->normal($params, $config) |
58 | 58 | )); |
@@ -84,11 +84,11 @@ |
||
84 | 84 | foreach ($keys as $key) { |
85 | 85 | $val = $value[$key]; |
86 | 86 | |
87 | - $result[] = is_array($val) ? $this->arrayToString($val) : (($isJsonArray ? '' : $key.':').trim(strval($val))); |
|
87 | + $result[] = is_array($val) ? $this->arrayToString($val) : (($isJsonArray ? '' : $key . ':') . trim(strval($val))); |
|
88 | 88 | } |
89 | 89 | |
90 | - $result = '['.implode(' ', $result ?? []).']'; |
|
90 | + $result = '[' . implode(' ', $result ?? []) . ']'; |
|
91 | 91 | |
92 | - return ($isJsonArray ? '' : 'map').$result; |
|
92 | + return ($isJsonArray ? '' : 'map') . $result; |
|
93 | 93 | } |
94 | 94 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | if (0 !== $destination->get('err_no')) { |
48 | - throw new InvalidResponseException(Exception::RESPONSE_BUSINESS_CODE_WRONG, '抖音返回业务异常: '.$destination->get('err_tips'), $destination); |
|
48 | + throw new InvalidResponseException(Exception::RESPONSE_BUSINESS_CODE_WRONG, '抖音返回业务异常: ' . $destination->get('err_tips'), $destination); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function getPlugins(array $params): array |
34 | 34 | { |
35 | - $method = Str::camel($params['_action'] ?? 'default').'Plugins'; |
|
35 | + $method = Str::camel($params['_action'] ?? 'default') . 'Plugins'; |
|
36 | 36 | |
37 | 37 | if (method_exists($this, $method)) { |
38 | 38 | return $this->{$method}(); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function getPlugins(array $params): array |
30 | 30 | { |
31 | - $method = Str::camel($params['_action'] ?? 'default').'Plugins'; |
|
31 | + $method = Str::camel($params['_action'] ?? 'default') . 'Plugins'; |
|
32 | 32 | |
33 | 33 | if (method_exists($this, $method)) { |
34 | 34 | return $this->{$method}($params); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function getPlugins(array $params): array |
34 | 34 | { |
35 | - $method = Str::camel($params['_action'] ?? 'default').'Plugins'; |
|
35 | + $method = Str::camel($params['_action'] ?? 'default') . 'Plugins'; |
|
36 | 36 | |
37 | 37 | if (method_exists($this, $method)) { |
38 | 38 | return $this->{$method}(); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function getPlugins(array $params): array |
34 | 34 | { |
35 | - $method = Str::camel($params['_action'] ?? 'default').'Plugins'; |
|
35 | + $method = Str::camel($params['_action'] ?? 'default') . 'Plugins'; |
|
36 | 36 | |
37 | 37 | if (method_exists($this, $method)) { |
38 | 38 | return $this->{$method}(); |