|
...
|
...
|
@@ -33,9 +33,9 @@ class TiktokShop |
|
|
|
* @var array|string[]
|
|
|
|
*/
|
|
|
|
protected static array $passages = [
|
|
|
|
'order' => Passage\Order\Order::class,
|
|
|
|
'order' => Passage\Order\Order::class,
|
|
|
|
'shop' => Passage\Shop\Shop::class,
|
|
|
|
'product' => Passage\Product\Product::class,
|
|
|
|
'product' => Passage\Product\Product::class,
|
|
|
|
'authorize' => Authorize::class,
|
|
|
|
'verify' => Verify::class,
|
|
|
|
'alliance' => Alliance::class,
|
|
...
|
...
|
@@ -55,7 +55,7 @@ class TiktokShop |
|
|
|
|
|
|
|
$app = $options ?: 'default';
|
|
|
|
|
|
|
|
$config = \config(TiktokShopProvider::$name.'.'.$app);
|
|
|
|
$config = \config(TiktokShopProvider::$name . '.' . $app);
|
|
|
|
|
|
|
|
if (!is_array($config)) {
|
|
|
|
throw new \InvalidArgumentException('config file not found');
|
|
...
|
...
|
@@ -69,7 +69,7 @@ class TiktokShop |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param array $options
|
|
|
|
* @param array $options
|
|
|
|
*
|
|
|
|
* @return Config
|
|
|
|
*/
|
|
...
|
...
|
@@ -79,7 +79,7 @@ class TiktokShop |
|
|
|
Arr::get($options, 'app_key'),
|
|
|
|
Arr::get($options, 'app_secret'),
|
|
|
|
Arr::get($options, 'base_uri'),
|
|
|
|
(float) Arr::get($options, 'timeout'),
|
|
|
|
(float)Arr::get($options, 'timeout'),
|
|
|
|
Arr::get($options, 'enable_mock')
|
|
|
|
);
|
|
|
|
}
|
|
...
|
...
|
@@ -95,7 +95,7 @@ class TiktokShop |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $accessToken
|
|
|
|
* @param string $accessToken
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
...
|
...
|
@@ -108,7 +108,7 @@ class TiktokShop |
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $name
|
|
|
|
* @param array $arguments
|
|
|
|
* @param array $arguments
|
|
|
|
*
|
|
|
|
* @return PassageProxy
|
|
|
|
*/
|
|
...
|
...
|
@@ -119,7 +119,9 @@ class TiktokShop |
|
|
|
try {
|
|
|
|
return PassageProxy::proxy($passage, $this->config);
|
|
|
|
} finally {
|
|
|
|
$this->config->setAccessToken('');
|
|
|
|
register_shutdown_function(function () {
|
|
|
|
$this->config->setAccessToken('');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|