From c80778f442ba8a9901d83cf9e029e358461cc672 Mon Sep 17 00:00:00 2001 From: Jonathan Henrique <31408451+jhowbhz@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:32:47 -0300 Subject: [PATCH] fix return image qrcode --- src/Base.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Base.php b/src/Base.php index 33fd032..6eb43f4 100644 --- a/src/Base.php +++ b/src/Base.php @@ -27,6 +27,10 @@ public static function defaultRequest(String $method, String $base_uri, String $ $request = new Request($method, $action, $headers, json_encode($body)); // create request $response = $client->send($request); // send request + if(isset(explode("?", $action)[0]) and explode("?", $action)[0] === 'getQrCode'){ + return $response->getBody()->getContents(); + } + return json_decode($response->getBody()->getContents()); // return response object } catch (ClientException $e) {