@@ -24,7 +24,9 @@ |
||
| 24 | 24 | $gateway = StringTool::uFirst($gateway); |
| 25 | 25 | $class = __NAMESPACE__ . '\\Provider\\' . $gateway; |
| 26 | 26 | if (class_exists($class)) { |
| 27 | - if(empty(self::$config)) self::config($config); |
|
| 27 | + if(empty(self::$config)) { |
|
| 28 | + self::config($config); |
|
| 29 | + } |
|
| 28 | 30 | $objcet = new $class(self::$config); |
| 29 | 31 | return $objcet; |
| 30 | 32 | } else { |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $gateway = $this->config['gateway'];// 正式环境 |
| 51 | 51 | if($this->config['sandbox'] === false){ |
| 52 | 52 | $this->gateway = isset($gateway[$this->gateway_type]) ? $gateway[$this->gateway_type] : $gateway['default'];// 沙箱环境 |
| 53 | - }else{ |
|
| 53 | + } else{ |
|
| 54 | 54 | $this->gateway = $gateway['sandbox'];// 沙箱环境 |
| 55 | 55 | } |
| 56 | 56 | |