Skip to content

Commit

Permalink
Merge pull request #1 from Diskominfotik-Banda-Aceh/user-status
Browse files Browse the repository at this point in the history
Add | check status user
  • Loading branch information
nurratna committed Sep 18, 2023
2 parents c385093 + e9acca1 commit de0f402
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 de0f402

Please sign in to comment.