diff --git a/src/ESignBsre.php b/src/ESignBsre.php index 505dc91..380a1e3 100644 --- a/src/ESignBsre.php +++ b/src/ESignBsre.php @@ -3,6 +3,7 @@ namespace DiskominfotikBandaAceh\ESignBsrePhp; use GuzzleHttp\Client as GuzzleClient; +use PhpParser\Node\Stmt\TryCatch; class ESignBsre { @@ -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]; }