|
|
@@ -60,7 +60,7 @@ class V2LakalaApi
|
|
|
}
|
|
|
|
|
|
public function tradeApi($resourcePath, V2ModelRequest $v2ModelRequest,
|
|
|
- $returnType = '\Lakala\OpenAPISDK\V2\Model\V2ModelResponse',
|
|
|
+ $returnType = '\SixShop\Lakala\OpenAPISDK\V2\Model\V2ModelResponse',
|
|
|
$method = 'POST')
|
|
|
{
|
|
|
$headerParams = [];
|
|
|
@@ -77,7 +77,7 @@ class V2LakalaApi
|
|
|
}
|
|
|
|
|
|
public function apiWithBody($resourcePath, $httpBody, $headerParams = [], $method = 'POST',
|
|
|
- $returnType = '\Lakala\OpenAPISDK\V2\Model\V2ModelResponse')
|
|
|
+ $returnType = '\SixShop\Lakala\OpenAPISDK\V2\Model\V2ModelResponse')
|
|
|
{
|
|
|
$this->setResourcePath($resourcePath);
|
|
|
|
|
|
@@ -193,7 +193,7 @@ class V2LakalaApi
|
|
|
{
|
|
|
$options = [
|
|
|
'timeout' => 10,
|
|
|
- 'respond_type' => \Lakala\OpenAPISDK\V2\Util\V2HttpService::RESPOND_TYPE_ARRAY,
|
|
|
+ 'respond_type' => \SixShop\Lakala\OpenAPISDK\V2\Util\V2HttpService::RESPOND_TYPE_ARRAY,
|
|
|
];
|
|
|
|
|
|
return $options;
|
|
|
@@ -241,7 +241,7 @@ class V2LakalaApi
|
|
|
throw new V2ApiException('获取私钥失败');
|
|
|
}
|
|
|
$res = openssl_sign($content, $sign, $privateKey, OPENSSL_ALGO_SHA256);
|
|
|
- if (function_exists('openssl_free_key')) {
|
|
|
+ if (function_exists('openssl_free_key') && version_compare(PHP_VERSION, '8.0.0', '<')) {
|
|
|
openssl_free_key($privateKey);
|
|
|
}
|
|
|
if (!$res) {
|