@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | protected function create($method): GatewayApplicationInterface |
75 | 75 | { |
76 | - $gateway = __NAMESPACE__.'\\Gateways\\'.Str::studly($method); |
|
76 | + $gateway = __NAMESPACE__ . '\\Gateways\\' . Str::studly($method); |
|
77 | 77 | |
78 | 78 | if (class_exists($gateway)) { |
79 | 79 | return self::make($gateway); |
@@ -29,8 +29,8 @@ |
||
29 | 29 | |
30 | 30 | $mweb_url = $this->preOrder($payload)->get('mweb_url'); |
31 | 31 | |
32 | - $url = is_null(Support::getInstance()->return_url) ? $mweb_url : $mweb_url. |
|
33 | - '&redirect_url='.urlencode(Support::getInstance()->return_url); |
|
32 | + $url = is_null(Support::getInstance()->return_url) ? $mweb_url : $mweb_url . |
|
33 | + '&redirect_url=' . urlencode(Support::getInstance()->return_url); |
|
34 | 34 | |
35 | 35 | return RedirectResponse::create($url); |
36 | 36 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function __construct($message, $raw = []) |
16 | 16 | { |
17 | - parent::__construct('INVALID_GATEWAY: '.$message, $raw, self::INVALID_GATEWAY); |
|
17 | + parent::__construct('INVALID_GATEWAY: ' . $message, $raw, self::INVALID_GATEWAY); |
|
18 | 18 | } |
19 | 19 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function __construct($message, $raw = []) |
16 | 16 | { |
17 | - parent::__construct('INVALID_SIGN: '.$message, $raw, self::INVALID_SIGN); |
|
17 | + parent::__construct('INVALID_SIGN: ' . $message, $raw, self::INVALID_SIGN); |
|
18 | 18 | } |
19 | 19 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function __construct($message, $raw = []) |
16 | 16 | { |
17 | - parent::__construct('ERROR_BUSINESS: '.$message, $raw, self::ERROR_BUSINESS); |
|
17 | + parent::__construct('ERROR_BUSINESS: ' . $message, $raw, self::ERROR_BUSINESS); |
|
18 | 18 | } |
19 | 19 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function __construct($message, $raw = []) |
16 | 16 | { |
17 | - parent::__construct('INVALID_CONFIG: '.$message, $raw, self::INVALID_CONFIG); |
|
17 | + parent::__construct('INVALID_CONFIG: ' . $message, $raw, self::INVALID_CONFIG); |
|
18 | 18 | } |
19 | 19 | } |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function __construct($message, $raw = []) |
16 | 16 | { |
17 | - parent::__construct('INVALID_ARGUMENT: '.$message, $raw, self::INVALID_ARGUMENT); |
|
17 | + parent::__construct('INVALID_ARGUMENT: ' . $message, $raw, self::INVALID_ARGUMENT); |
|
18 | 18 | } |
19 | 19 | } |
@@ -15,6 +15,6 @@ |
||
15 | 15 | */ |
16 | 16 | public function __construct($message, $raw = [], $code = self::ERROR_GATEWAY) |
17 | 17 | { |
18 | - parent::__construct('ERROR_GATEWAY: '.$message, $raw, $code); |
|
18 | + parent::__construct('ERROR_GATEWAY: ' . $message, $raw, $code); |
|
19 | 19 | } |
20 | 20 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | 'appId' => !$this->payRequestUseSubAppId ? $payload['appid'] : $payload['sub_appid'], |
41 | 41 | 'timeStamp' => strval(time()), |
42 | 42 | 'nonceStr' => Str::random(), |
43 | - 'package' => 'prepay_id='.$this->preOrder($payload)->get('prepay_id'), |
|
43 | + 'package' => 'prepay_id=' . $this->preOrder($payload)->get('prepay_id'), |
|
44 | 44 | 'signType' => 'MD5', |
45 | 45 | ]; |
46 | 46 | $pay_request['paySign'] = Support::generateSign($pay_request); |