@@ -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'); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | public function __call($name, $params) |
| 43 | 43 | { |
| 44 | - $plugin = '\Yansongda\Pay\Shortcut\Epay\\'.Str::studly($name).'Shortcut'; |
|
| 44 | + $plugin = '\Yansongda\Pay\Shortcut\Epay\\' . Str::studly($name) . 'Shortcut'; |
|
| 45 | 45 | |
| 46 | 46 | return Artful::shortcut($plugin, ...$params); |
| 47 | 47 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @throws ContainerException |
| 51 | 51 | * @throws InvalidParamsException |
| 52 | 52 | */ |
| 53 | - public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket |
|
| 53 | + public function pay(array $plugins, array $params): null | Collection | MessageInterface | Rocket |
|
| 54 | 54 | { |
| 55 | 55 | return Artful::artful($plugins, $params); |
| 56 | 56 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | /** |
| 68 | 68 | * @throws InvalidParamsException |
| 69 | 69 | */ |
| 70 | - public function cancel(array $order): Collection|Rocket |
|
| 70 | + public function cancel(array $order): Collection | Rocket |
|
| 71 | 71 | { |
| 72 | 72 | throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, 'Epay does not support cancel api'); |
| 73 | 73 | } |
@@ -75,12 +75,12 @@ discard block |
||
| 75 | 75 | /** |
| 76 | 76 | * @throws InvalidParamsException |
| 77 | 77 | */ |
| 78 | - public function close(array $order): Collection|Rocket |
|
| 78 | + public function close(array $order): Collection | Rocket |
|
| 79 | 79 | { |
| 80 | 80 | throw new InvalidParamsException(Exception::PARAMS_METHOD_NOT_SUPPORTED, 'Epay does not support close api'); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function refund(array $order): Collection|Rocket |
|
| 83 | + public function refund(array $order): Collection | Rocket |
|
| 84 | 84 | { |
| 85 | 85 | Event::dispatch(new MethodCalled('epay', __METHOD__, $order, null)); |
| 86 | 86 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @throws ContainerException |
| 92 | 92 | * @throws InvalidParamsException |
| 93 | 93 | */ |
| 94 | - public function callback(null|array|ServerRequestInterface $contents = null, ?array $params = null): Collection|Rocket |
|
| 94 | + public function callback(null | array | ServerRequestInterface $contents = null, ?array $params = null): Collection | Rocket |
|
| 95 | 95 | { |
| 96 | 96 | $request = $this->getCallbackParams($contents); |
| 97 | 97 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | ); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - public function query(array $order): Collection|Rocket |
|
| 115 | + public function query(array $order): Collection | Rocket |
|
| 116 | 116 | { |
| 117 | 117 | Event::dispatch(new MethodCalled('epay', __METHOD__, $order, null)); |
| 118 | 118 | |