@@ -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 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function pay($endpoint, array $payload): Collection |
| 33 | 33 | { |
| 34 | - $biz_array=json_decode($payload['biz_content'], true); |
|
| 34 | + $biz_array = json_decode($payload['biz_content'], true); |
|
| 35 | 35 | if (empty($biz_array['buyer_id'])) { |
| 36 | 36 | throw new InvalidArgumentException('buyer_id required'); |
| 37 | 37 | } |