diff --git a/src/Http/Response.php b/src/Http/Response.php index 7f81993..43dddb1 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -21,7 +21,7 @@ public function setResponse($httpResponse) } return $this; - } + } public function getStatusCode() { @@ -58,8 +58,8 @@ private function parseJson($json) if (!$this->isSuccessful()) { return [ - 'error' => $data['errors'][0]['errorDetail'], - 'errorCode' => $data['errors'][0]['errorCode'] + 'error' => $data['errors'][0]['message'], + 'errorCode' => $data['errors'][0]['code'] ]; } diff --git a/src/Services/SignatureService.php b/src/Services/SignatureService.php index 848b645..a5e1e1b 100644 --- a/src/Services/SignatureService.php +++ b/src/Services/SignatureService.php @@ -2,6 +2,7 @@ namespace Jooyeshgar\Moadian\Services; +use Carbon\Carbon; use Firebase\JWT\JWT; class SignatureService