DD-3602: [BACK]. [Доверенность водителю с КЭП] - [реализовать отправку документа через АПИ Диадок]
This commit is contained in:
parent
6e87f37ad3
commit
4947b8ea19
|
|
@ -31,9 +31,9 @@ class DigitalSignatureService
|
||||||
$document = $this->api->download($request->url, $token);
|
$document = $this->api->download($request->url, $token);
|
||||||
|
|
||||||
exec(sprintf('cp %s %s.pdf', $document->tempFileName, $document->tempFileName));
|
exec(sprintf('cp %s %s.pdf', $document->tempFileName, $document->tempFileName));
|
||||||
$signature = exec(sprintf('cryptcp -sign -detached -der %s', $document->tempFileName));
|
exec(sprintf('cryptcp -sign -detached -der %s', $document->tempFileName . '.pdf'));
|
||||||
|
|
||||||
$response = base64_encode($signature);
|
$response = base64_encode($document->tempFileName . '.sgn');
|
||||||
|
|
||||||
$this->removeExistingDocumentService->removeExistingDocument($document);
|
$this->removeExistingDocumentService->removeExistingDocument($document);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue