/** * Fetch the current status * * @return string * * @throws InvalidFetchStatusException */ public function fetchStatus() { $result = $this->sesClient->getIdentityVerificationAttributes(['Identities' => [$this->identity->getIdentity()]]); $status = $result->search("VerificationAttributes.*.VerificationStatus"); if (!is_array($status)) { throw new InvalidFetchStatusException("unable to fetch the status. Did you create the identity?"); } return current($status); }