Skip to content

Commit e9acca1

Browse files
committed
Add | check status user
1 parent c385093 commit e9acca1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/ESignBsre.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace DiskominfotikBandaAceh\ESignBsrePhp;
44

55
use GuzzleHttp\Client as GuzzleClient;
6+
use PhpParser\Node\Stmt\TryCatch;
67

78
class ESignBsre
89
{
@@ -81,6 +82,18 @@ public function verification()
8182
return new ESignBsreResponse($response);
8283
}
8384

85+
public function statusUser($nik) {
86+
try {
87+
$response = $this->http->request('GET', "{$this->getBaseUrl()}/api/user/status/$nik", [
88+
'auth' => $this->getAuth()
89+
]);
90+
} catch (\Exception $e) {
91+
$response = $e->getResponse();
92+
}
93+
94+
return new ESignBsreResponse($response);
95+
}
96+
8497
private function getAuth(){
8598
return [$this->username, $this->password];
8699
}

0 commit comments

Comments
 (0)