Skip to content

Commit

Permalink
fix return image qrcode
Browse files Browse the repository at this point in the history
  • Loading branch information
jhowbhz authored Dec 1, 2022
1 parent aa52c8d commit c80778f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c80778f

Please sign in to comment.