Example #1
0
 public function startDdockSession($documentPath, $storePath)
 {
     if (!IdCardAuthentication::isUserLoggedIn()) {
         IdCardAuthentication::login();
     }
     try {
         $contents = file_get_contents($documentPath);
         $contents = $this->prepareDdocDataFile($contents, $storePath);
         $result = $this->soap->startSession("", $contents, true)['Sesscode'];
         if (is_int($result)) {
             return $result;
         } else {
             throw new SigningException($result['Status']);
         }
     } catch (\SoapFault $e) {
         $this->catchSoapError($e);
     }
 }