mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
include/dokument_export.class.php now checks the new signature server response structure
This commit is contained in:
@@ -559,18 +559,19 @@ class dokument_export
|
||||
curl_close($ch);
|
||||
$resultdata = json_decode($result);
|
||||
|
||||
if (isset($resultdata->success) && $resultdata->success == 'true')
|
||||
// If it is success
|
||||
if (isset($resultdata->error) && $resultdata->error == 0)
|
||||
{
|
||||
$this->signed_filename = $this->temp_folder .'/signed.pdf';
|
||||
file_put_contents($this->signed_filename, base64_decode($resultdata->document));
|
||||
file_put_contents($this->signed_filename, base64_decode($resultdata->retval));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else // otherwise if it is an error
|
||||
{
|
||||
if(isset($resultdata->errormsg))
|
||||
$this->errormsg = $resultdata->errormsg;
|
||||
if(isset($resultdata->retval))
|
||||
$this->errormsg = $resultdata->retval;
|
||||
else
|
||||
$this->errormsg = 'Unknown Error:'.print_r($resultdata,true);
|
||||
$this->errormsg = 'Unknown Error:'.print_r($resultdata, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user