Skip to content

Commit

Permalink
Add | check status user
Browse files Browse the repository at this point in the history
  • Loading branch information
nurratna committed Sep 18, 2023
1 parent c385093 commit e9acca1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ESignBsre.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace DiskominfotikBandaAceh\ESignBsrePhp;

use GuzzleHttp\Client as GuzzleClient;
use PhpParser\Node\Stmt\TryCatch;

class ESignBsre
{
Expand Down Expand Up @@ -81,6 +82,18 @@ public function verification()
return new ESignBsreResponse($response);
}

public function statusUser($nik) {
try {
$response = $this->http->request('GET', "{$this->getBaseUrl()}/api/user/status/$nik", [
'auth' => $this->getAuth()
]);
} catch (\Exception $e) {
$response = $e->getResponse();
}

return new ESignBsreResponse($response);
}

private function getAuth(){
return [$this->username, $this->password];
}
Expand Down

0 comments on commit e9acca1

Please sign in to comment.