From 7ac2f9ab12d7b03bf6fbe06cd3a3c6f2c9e990c8 Mon Sep 17 00:00:00 2001 From: Risang Baskoro Date: Tue, 7 Feb 2023 03:20:02 +0700 Subject: [PATCH] hotfix: fix MidtransResponse status and reasonPhrase --- src/Helper/MidtransResponse.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Helper/MidtransResponse.php b/src/Helper/MidtransResponse.php index 8d1e4f1..6d196bc 100644 --- a/src/Helper/MidtransResponse.php +++ b/src/Helper/MidtransResponse.php @@ -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'); }