我使用 JWT 身份驗證將 Docusing 與 PHP Laravel 應用程式集成。它運行良好,可以將電子郵件發送給收件人進行簽名。現在,在完成所有簽名后,我們想下載帶有 CoC 的完整簽名檔案。
我正在使用以下代碼獲取特定信封的簽名檔案:
$envelope_api = new EnvelopesApi($apiClient);
$tmpFile = $envelope_api->getDocument($account_id, 'combined', $envelope_id);
$savCert = file_put_contents("signed_document.pdf", file_get_contents($tmpFile->getPathname()));
但是下載檔案時我得到了空檔案。如果您能提示如何解決問題,那將非常有幫助。
$tmpfile 的 json 有效負載:
object(SplFileObject)#418 (5)
{
["pathName":"SplFileInfo":private]=> string(44) "C:\Users\AppData\Local\Temp\19F.tmp"
["fileName":"SplFileInfo":private]=> string(7) "19F.tmp"
["openMode":"SplFileObject":private]=> string(1) "r"
["delimiter":"SplFileObject":private]=> string(1) ","
["enclosure":"SplFileObject":private]=> string(1) """
}
uj5u.com熱心網友回復:
這是 SDK 6.5 版 6.5 版中的一個錯誤 6.5.1 版已修復。請更新您的軟體包,然后重試。
如果您使用 6.5,則需要添加以下幾行:
$tmpFile = $envelopeApi->getDocument($account_id, 'combined', $envelope_id);
$tmpFile->rewind();
$contents = $tmpFile->fread($tmpFile->fstat()['size']);
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/377315.html
