在我们的组织dmz web应用程序中,我们代表签名者(我们的客户)生成信封并将其发送给公证人。并尝试在沙箱环境下通过eSign应用程序接口使用eNotary (InPersonSigner Receipient)信封中的签名、印章、DateSigned标签。但是docusignapi不允许我们创建签名,印章,DateSigned标签,但它只允许公证标签。
如何通过eSign应用编程接口使用公证的签名、盖章、DateSigned选项卡?
更新的代码抛出附加错误"Notary_Signing_Host_Tabs_Not_Allowed":
string signerEmail = "signer@domain.com";
string signerName = "Signer";
string notaryEmail = "notary@domain.com";
string notaryName = "Notary";
// Step 1. Create the envelope definition
EnvelopeDefinition envelope = new EnvelopeDefinition();
envelope.EmailSubject = "Please sign this document";
byte[] buffer = System.IO.File.ReadAllBytes("Execute_and_Notarize.pdf");
Document doc1 = new Document();
String doc1b64 = Convert.ToBase64String(buffer);
doc1.DocumentBase64 = doc1b64;
doc1.Name = "Notarize1_1page"; // can be different from actual file name
doc1.FileExtension = "pdf";
doc1.DocumentId = "1";
// The order in the docs array determines the order in the envelope
envelope.Documents = new List<Document> { doc1 };
Notarize notarize1 = new Notarize
{
AnchorString = "/notary1/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "10",
Required = "true"
};
SignHere notarizesignhere1 = new SignHere
{
AnchorString = "/notarysigner1/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "10"
};
SignHere notarizesignhere2 = new SignHere
{
AnchorString = "/notarysignerseal1/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "10",
IsSealSignTab = "true"
};
DateSigned notarizedatesigned1 = new DateSigned()
{
AnchorString = "/notarysigner1ds/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "10"
};
Tabs notaryTabs = new Tabs
{
NotarizeTabs = new List<Notarize> { notarize1 },
SignHereTabs = new List<SignHere> { notarizesignhere1, notarizesignhere2 },
DateSignedTabs = new List<DateSigned> { notarizedatesigned1 }
};
NotaryHost notaryHost = new NotaryHost()
{
Email = notaryEmail,
Name = notaryName,
DeliveryMethod = "email",
RecipientId = "2",
Tabs = notaryTabs
};
// Create signHere fields (also known as tabs) on the documents,
// We're using anchor (autoPlace) positioning
//
// The DocuSign platform seaches throughout your envelope's
// documents for matching anchor strings.
SignHere signHere1 = new SignHere
{
AnchorString = "/signer1/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "10"
};
DateSigned dateSigned1 = new DateSigned()
{
AnchorString = "/signer1ds/",
AnchorUnits = "pixels",
AnchorXOffset = "10",
AnchorYOffset = "10"
};
// Tabs are set per recipient / signer
Tabs signer1Tabs = new Tabs
{
SignHereTabs = new List<SignHere> { signHere1 },
DateSignedTabs = new List<DateSigned> { dateSigned1 }
};
// Create a signer recipient to sign the document, identified by name and email
// We set the clientUserId to enable embedded signing for the recipient
// We're setting the parameters via the object creation
InPersonSigner inPersonSigner1 = new InPersonSigner()
{
Email = signerEmail,
Name = signerName,
RecipientId = "1",
InPersonSigningType = "notary",
Tabs = signer1Tabs
};
inPersonSigner1.NotaryHost = notaryHost;
// Add the recipient to the envelope object
Recipients recipients = new Recipients
{
InPersonSigners = new List<InPersonSigner> { inPersonSigner1 },
};
envelope.Recipients = recipients;Image Attachment: errorCode - notary_signing_host_tabs_not_allowed
发布于 2020-08-19 05:48:20
您至少遗漏了一行:
inPersonSigner1.NotaryHost = notaryHost;以下是来自my blog post的关于这个主题的C#片段:
// To complete this code snippet, you will need an Envelope and a Document object
var notarizeTab = new Notarize
{
XPosition = "100",
YPosition = "100"
};
var signHereTab = new SignHere
{
XPosition = "200",
YPosition = "200"
};
var notarizeTabs = new List<Notarize>();
notarizeTabs.Add(notarizeTab);
var signHereTabs = new List<SignHere>();
signHereTabs.Add(signHereTab);
var notaryHost = new NotaryHost
{
Name = "Nadia Notary",
Email = "nadianotary@domain.com",
DeliveryMethod = "email",
RecipientId = "2",
Tabs = new Tabs { NotarizeTabs = notarizeTabs }
};
// InPersonSigner is used here even if the signer doesn't sign in person
var inPersonSigner = new InPersonSigner
{
NotaryHost = notaryHost,
Name = "Eddie End User",
Email = "endusersigner@domain.com",
RecipientId = "1",
InPersonSigningType = "notary",
Tabs = new Tabs { SignHereTabs = signHereTabs }
};
var inPersonSigners = new List<InPersonSigner>();
inPersonSigners.Add(inPersonSigner);
var recipients = new Recipients{ InPersonSigners = inPersonSigners };您可以添加所需的任何选项卡,但重要的是要了解公证人是不同的收件人,他们有自己的单独选项卡。
https://stackoverflow.com/questions/63473849
复制相似问题