发送多个文档以签署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=";请签署这份文件";;Document doc1=新文档((;Document doc2=新文档((;

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 };

最新更新