Skip to content

Commit

Permalink
fix cdr code, error construct
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Nov 6, 2018
1 parent 840ab15 commit fd3a499
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Model/Response/CdrResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function isAccepted()
{
$code = intval($this->getCode());

return $code === 0 && $code >= 4000;
return $code === 0 || $code >= 4000;
}

/**
Expand Down
11 changes: 11 additions & 0 deletions src/Core/Model/Response/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ class Error
*/
protected $message;

/**
* Error constructor.
* @param string $code
* @param string $message
*/
public function __construct($code = '', $message = '')
{
$this->code = $code;
$this->message = $message;
}

/**
* @return string
*/
Expand Down

0 comments on commit fd3a499

Please sign in to comment.