@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | public ?array $params = null; |
15 | 15 | |
16 | - public null|array|ServerRequestInterface $contents; |
|
16 | + public null | array | ServerRequestInterface $contents; |
|
17 | 17 | |
18 | - public function __construct(string $provider, null|array|ServerRequestInterface $contents, ?array $params = null, ?Rocket $rocket = null) |
|
18 | + public function __construct(string $provider, null | array | ServerRequestInterface $contents, ?array $params = null, ?Rocket $rocket = null) |
|
19 | 19 | { |
20 | 20 | $this->provider = $provider; |
21 | 21 | $this->contents = $contents; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | public function getPlugins(array $params): array |
42 | 42 | { |
43 | - $method = Str::camel($params['_action'] ?? 'default').'Plugins'; |
|
43 | + $method = Str::camel($params['_action'] ?? 'default') . 'Plugins'; |
|
44 | 44 | |
45 | 45 | if (isset($params['out_request_no'])) { |
46 | 46 | return $this->refundPlugins(); |
@@ -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}(); |
@@ -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}(); |
@@ -23,8 +23,7 @@ discard block |
||
23 | 23 | $radar = $rocket->getRadar(); |
24 | 24 | |
25 | 25 | $response = 'GET' === $radar->getMethod() ? |
26 | - $this->buildRedirect($radar->getUri()->__toString(), $rocket->getPayload()) : |
|
27 | - $this->buildHtml($radar->getUri()->__toString(), $rocket->getPayload()); |
|
26 | + $this->buildRedirect($radar->getUri()->__toString(), $rocket->getPayload()) : $this->buildHtml($radar->getUri()->__toString(), $rocket->getPayload()); |
|
28 | 27 | |
29 | 28 | $rocket->setDestination($response); |
30 | 29 | |
@@ -35,7 +34,7 @@ discard block |
||
35 | 34 | |
36 | 35 | protected function buildRedirect(string $endpoint, Collection $payload): Response |
37 | 36 | { |
38 | - $url = $endpoint.(!str_contains($endpoint, '?') ? '?' : '&').$payload->query(); |
|
37 | + $url = $endpoint . (!str_contains($endpoint, '?') ? '?' : '&') . $payload->query(); |
|
39 | 38 | |
40 | 39 | $content = sprintf( |
41 | 40 | '<!DOCTYPE html> |
@@ -58,10 +57,10 @@ discard block |
||
58 | 57 | |
59 | 58 | protected function buildHtml(string $endpoint, Collection $payload): Response |
60 | 59 | { |
61 | - $sHtml = "<form id='alipay_submit' name='alipay_submit' action='".$endpoint."' method='POST'>"; |
|
60 | + $sHtml = "<form id='alipay_submit' name='alipay_submit' action='" . $endpoint . "' method='POST'>"; |
|
62 | 61 | foreach ($payload->all() as $key => $val) { |
63 | 62 | $val = str_replace("'", ''', $val); |
64 | - $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>"; |
|
63 | + $sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>"; |
|
65 | 64 | } |
66 | 65 | $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>"; |
67 | 66 | $sHtml .= "<script>document.forms['alipay_submit'].submit();</script>"; |
@@ -32,8 +32,8 @@ |
||
32 | 32 | |
33 | 33 | $rocket->setPayload([ |
34 | 34 | '_method' => 'GET', |
35 | - '_url' => 'v3/merchant-service/images/'.$mediaId, |
|
36 | - '_service_url' => 'v3/merchant-service/images/'.$mediaId, |
|
35 | + '_url' => 'v3/merchant-service/images/' . $mediaId, |
|
36 | + '_service_url' => 'v3/merchant-service/images/' . $mediaId, |
|
37 | 37 | ]); |
38 | 38 | |
39 | 39 | Logger::info('[Wechat][Extend][Complaints][QueryImagePlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -32,8 +32,8 @@ |
||
32 | 32 | |
33 | 33 | $rocket->mergePayload([ |
34 | 34 | '_method' => 'POST', |
35 | - '_url' => 'v3/merchant-service/complaints-v2/'.$complaintId.'/update-refund-progress', |
|
36 | - '_service_url' => 'v3/merchant-service/complaints-v2/'.$complaintId.'/update-refund-progress', |
|
35 | + '_url' => 'v3/merchant-service/complaints-v2/' . $complaintId . '/update-refund-progress', |
|
36 | + '_service_url' => 'v3/merchant-service/complaints-v2/' . $complaintId . '/update-refund-progress', |
|
37 | 37 | ])->exceptPayload('complaint_id'); |
38 | 38 | |
39 | 39 | Logger::info('[Wechat][Extend][Complaints][UpdateRefundPlugin] 插件装载完毕', ['rocket' => $rocket]); |
@@ -34,8 +34,8 @@ |
||
34 | 34 | |
35 | 35 | $rocket->setPayload([ |
36 | 36 | '_method' => 'GET', |
37 | - '_url' => 'v3/merchant-service/complaints-v2?'.$query, |
|
38 | - '_service_url' => 'v3/merchant-service/complaints-v2?'.$query, |
|
37 | + '_url' => 'v3/merchant-service/complaints-v2?' . $query, |
|
38 | + '_service_url' => 'v3/merchant-service/complaints-v2?' . $query, |
|
39 | 39 | ]); |
40 | 40 | |
41 | 41 | Logger::info('[Wechat][Extend][Complaints][QueryPlugin] 插件装载完毕', ['rocket' => $rocket]); |