Skip to content

Commit

Permalink
hotfix: fix MidtransResponse status and reasonPhrase
Browse files Browse the repository at this point in the history
  • Loading branch information
risangbaskoro committed Feb 6, 2023
1 parent a6c791b commit 7ac2f9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Helper/MidtransResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ class MidtransResponse extends Response
public function __construct(MessageInterface $response)
{
parent::__construct($response);

$this->response = $response->withStatus(
$this->json('status_code') ?? 200,
$this->json('status_message') ?? 'OK'
);
$this->transaction_id = $this->json('transaction_id');
$this->actions = $this->json('actions');
}
Expand Down

0 comments on commit 7ac2f9a

Please sign in to comment.