@@ -42,6 +42,6 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function __call($name, $arguments) |
| 44 | 44 | { |
| 45 | - return call_user_func_array([$this['base'], $name], $arguments); |
|
| 45 | + return call_user_func_array([ $this[ 'base' ], $name ], $arguments); |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | ], $params); |
| 40 | 40 | |
| 41 | 41 | $this->app->setEndpointConfig($method, [ |
| 42 | - 'return_url' => $returnUrl ?: $this->app['config']->get('return_url'), |
|
| 43 | - 'notify_url' => $this->app['config']->get('notify_url'), |
|
| 42 | + 'return_url' => $returnUrl ?: $this->app[ 'config' ]->get('return_url'), |
|
| 43 | + 'notify_url' => $this->app[ 'config' ]->get('notify_url'), |
|
| 44 | 44 | ]); |
| 45 | 45 | |
| 46 | 46 | return $this->sdkExecute($method, [ |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | ], $params); |
| 69 | 69 | |
| 70 | 70 | $this->app->setEndpointConfig($method, [ |
| 71 | - 'return_url' => $returnUrl ?: $this->app['config']->get('return_url'), |
|
| 72 | - 'notify_url' => $this->app['config']->get('notify_url'), |
|
| 71 | + 'return_url' => $returnUrl ?: $this->app[ 'config' ]->get('return_url'), |
|
| 72 | + 'notify_url' => $this->app[ 'config' ]->get('notify_url'), |
|
| 73 | 73 | ]); |
| 74 | 74 | |
| 75 | 75 | return $this->pageExecute($method, [ |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | 'product_code' => 'FAST_INSTANT_TRADE_PAY', |
| 97 | 97 | ], $params); |
| 98 | 98 | $this->app->setEndpointConfig($method, [ |
| 99 | - 'return_url' => $returnUrl ?: $this->app['config']->get('return_url'), |
|
| 100 | - 'notify_url' => $this->app['config']->get('notify_url'), |
|
| 99 | + 'return_url' => $returnUrl ?: $this->app[ 'config' ]->get('return_url'), |
|
| 100 | + 'notify_url' => $this->app[ 'config' ]->get('notify_url'), |
|
| 101 | 101 | ]); |
| 102 | 102 | |
| 103 | 103 | return $this->pageExecute($method, [ |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function getBaseInfo() |
| 27 | 27 | { |
| 28 | 28 | $method = 'alipay.open.mini.baseinfo.query'; |
| 29 | - $params = []; |
|
| 29 | + $params = [ ]; |
|
| 30 | 30 | |
| 31 | 31 | return $this->request($method, [ |
| 32 | 32 | 'biz_content' => $params, |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | public function getCategoryList() |
| 151 | 151 | { |
| 152 | 152 | $method = 'alipay.open.mini.category.query'; |
| 153 | - $params = []; |
|
| 153 | + $params = [ ]; |
|
| 154 | 154 | |
| 155 | 155 | return $this->request($method, [ |
| 156 | 156 | 'biz_content' => $params, |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | public function faceAuthenticationResultsQuery() |
| 170 | 170 | { |
| 171 | 171 | $method = 'zoloz.identification.customer.certifyzhub.query'; |
| 172 | - $params = []; |
|
| 172 | + $params = [ ]; |
|
| 173 | 173 | |
| 174 | 174 | return $this->request($method, [ |
| 175 | 175 | 'biz_content' => $params, |
@@ -197,7 +197,7 @@ |
||
| 197 | 197 | public function getList() |
| 198 | 198 | { |
| 199 | 199 | $method = 'alipay.open.mini.version.list.query'; |
| 200 | - $params = []; |
|
| 200 | + $params = [ ]; |
|
| 201 | 201 | |
| 202 | 202 | return $this->request($method, [ |
| 203 | 203 | 'biz_content' => $params, |
@@ -56,6 +56,6 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | public function __call($name, $arguments) |
| 58 | 58 | { |
| 59 | - return call_user_func_array([$this['base'], $name], $arguments); |
|
| 59 | + return call_user_func_array([ $this[ 'base' ], $name ], $arguments); |
|
| 60 | 60 | } |
| 61 | 61 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | class Alipay |
| 27 | 27 | { |
| 28 | - protected static $config = []; |
|
| 28 | + protected static $config = [ ]; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * make. |
@@ -37,10 +37,10 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @throws \EasyAlipay\Kernel\Exceptions\ApplicationException |
| 39 | 39 | */ |
| 40 | - public static function make(string $name, array $config = []) |
|
| 40 | + public static function make(string $name, array $config = [ ]) |
|
| 41 | 41 | { |
| 42 | 42 | $namespace = Str::studly($name); |
| 43 | - $application = __NAMESPACE__."\\{$namespace}\\Application"; |
|
| 43 | + $application = __NAMESPACE__ . "\\{$namespace}\\Application"; |
|
| 44 | 44 | |
| 45 | 45 | if (class_exists($application)) { |
| 46 | 46 | $config = array_replace_recursive(self::$config, $config); |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $method = 'alipay.system.oauth.token'; |
| 32 | 32 | |
| 33 | - $param = []; |
|
| 33 | + $param = [ ]; |
|
| 34 | 34 | |
| 35 | 35 | if ($grantType !== 'authorization_code') { |
| 36 | - $param['refresh_token'] = $code; |
|
| 36 | + $param[ 'refresh_token' ] = $code; |
|
| 37 | 37 | } else { |
| 38 | - $param['code'] = $code; |
|
| 38 | + $param[ 'code' ] = $code; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $params = array_merge([ |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $url = 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?'; |
| 68 | 68 | |
| 69 | - return $url.http_build_query($params); |
|
| 69 | + return $url . http_build_query($params); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | 'state' => $state, |
| 112 | 112 | ]; |
| 113 | 113 | $this->app->setEndpointConfig($method, [ |
| 114 | - 'return_url' => $returnUrl ?: $this->app['config']->get('return_url'), |
|
| 114 | + 'return_url' => $returnUrl ?: $this->app[ 'config' ]->get('return_url'), |
|
| 115 | 115 | ]); |
| 116 | 116 | |
| 117 | 117 | return $this->request($method, [ |