Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
afiqiqmal committed Apr 11, 2021
1 parent e1108a0 commit 63f318b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/HttpClient/PayResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ class PayResponse

public function __construct($response)
{
if ($response instanceof \Exception) {
$this->error = true;
$this->status_code = $response->getCode();
$this->body = $response->getMessage();
}

try {
$this->error = !$response->isOk();
$this->status_code = $response->status();
Expand Down

0 comments on commit 63f318b

Please sign in to comment.