Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "seka19/tracking-sdk-php",
"authors": [
{
"name": "www.trackingmore.com",
"email": "info@trackingmore.org"
}
],
"description": "Tracking PHP SDK",
"license": "MIT",
"require": {
"php": ">=7.1",
"ext-json": "*"
},
"autoload": {
"classmap": [
"lib/"
]
}
}
6 changes: 3 additions & 3 deletions lib/Api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static function checkParamsRequirements($params)
/**
* Check if the data meets the requirements.
*
* @return json response.
* @return string response.
*/
public static function checkSendApi($data)
{
Expand Down Expand Up @@ -162,7 +162,7 @@ public static function getRequestHeader()
/**
* send api request.
*
* @return array $response.
* @return string $response.
*/
public static function sendApiRequest($params = [], $method = "GET")
{
Expand All @@ -175,7 +175,7 @@ public static function sendApiRequest($params = [], $method = "GET")
/**
* error params request.
*
* @return json response.
* @return string response.
*/
public static function errorResponse($code, $message = "", $data = [])
{
Expand Down
4 changes: 2 additions & 2 deletions lib/RequestApi.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RequestApi
/**
* send api request.
*
* @return json $response.
* @return string $response.
*/
public static function send($method = "GET")
{
Expand Down Expand Up @@ -72,7 +72,7 @@ public static function send($method = "GET")
$response = curl_exec($curl);
curl_close($curl);
unset($curl);
return $response;
return (string)$response;
}

}