Skip to content

Commit

Permalink
fix using body bug
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzadimahdi committed Dec 26, 2019
1 parent 1533efa commit 2443f04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Drivers/Zibal/Zibal.php
Expand Up @@ -96,11 +96,11 @@ public function purchase()
);
$body = json_decode($response->getBody()->getContents(), true);

if ($response->result != 100) {
if ($body->result != 100) {
// some error has happened
throw new PurchaseFailedException($response->message);
throw new PurchaseFailedException($body->message);
} else {
$this->invoice->transactionId($response->trackId);
$this->invoice->transactionId($body->trackId);
}

// return the transaction's id
Expand Down

0 comments on commit 2443f04

Please sign in to comment.