繁体   English   中英

发送多份文件签署 DocuSign C#

[英]Sending multiple documents to sign DocuSign C#

我正在使用带有 c# 的 DocuSign API 并且我正在使用方法将文档发送给多个收件人,要求签名。

public string SendDocument(string FileName, string DocumentName, DocuSignRecipient[] Recipients,
            string EmailSubject = null)
{
    DocuSignParams Params = MakeParams();

    Params.Command = "send";

    Params.FileName = FileName;
    Params.DocumentName = DocumentName;
    Params.Recipients = Recipients;
    Params.EmailSubject = EmailSubject;

    DocuSignResponse Response = RunDocuSignApp(Params);

    if (!Response.Success)
        throw new Exception(Response.Message);

    return Response.EnvelopeId;
}

但是,正如你所看到的,第一个参数是一个文件,所以我不能一次发送多个文件。

有没有办法做到这一点?

谢谢。

如果您使用 C# SDK,您可以这样做。 我建议您首先克隆我们的C# 示例代码,以便了解它是如何工作的。 您的方案的相关代码如下所示:(但没有 nuget 将无法工作):

信封定义信封定义=新信封定义(); envelopeDefinition.EmailSubject = "请在此文件上签名"; 文档 doc1 = new Document(); 文档 doc2 = new Document();

        String doc1b64 = Convert.ToBase64String(buffer);

        doc1.DocumentBase64 = doc1b64;
        doc1.Name = "Lorem Ipsum"; // can be different from actual file name
        doc1.FileExtension = "pdf";
        doc1.DocumentId = "3";

        // The order in the docs array determines the order in the envelope
        envelopeDefinition.Documents = new List<Document> { doc1, doc2 };

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM