我有一个关于docusign api的问题。我正在使用docusign api进行电子签名。在我的要求中,收件人视图不会显示在docusign网站上,只显示在我的网站上,用户可以在该网站上对文档进行电子签名。基本上我做到了这一点。我的问题现在开始。如何在文档上添加两个收件人。我尝试与单个收件人但不知道如何使用多个收件人。这里有两个收件人(人),一个是我,另一个是我的客户从我这里购买产品。当我把这个信封发给我的客户。它将首先出现在我身上然后我的标志将转到我的客户端并等待它的标志。我怎么能这样做呢?
require_once './docusign-php-client/src/DocuSign_Client.php';
require_once './docusign-php-client/src/service/DocuSign_RequestSignatureService.php';
require_once './docusign-php-client/src/service/DocuSign_ViewsService.php';
$clientConfig = array(
// Enter your Integrator Key, Email, and Password
'integrator_key' => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 'email' => "xxxxxxxxxxxxxxxxxxxxxx", 'password' => "xxxxxxxxxxxxxxxxxx",
// API version (v2 is latest) and environment (i.e. demo, www, etc)
'version' => 'v2', 'environment' => 'demo'
);
// Instantiate client and call the Login API
$client = new DocuSign_Client($clientConfig);
// create service object and configure envelope settings, document(s), and recipient(s)
$service = new DocuSign_RequestSignatureService($client);
$emailSubject = "Please sign this document.";
$emailBlurb = "This is a document from Developer who test this docusign app. I would like to work with this.";
// add one signHere tab for the recipient located 100 pixels right and
// 150 pixels down from the top left corner of document's first page
$tabs1 = array( "signHereTabs" => array(
array( "documentId" => "2",
"pageNumber" => "1",
"xPosition" => "450",
"yPosition" => "233" )));
// $tabs2 = array( "signHereTabs" => array(
// array( "documentId" => "2",
// "pageNumber" => "1",
// "xPosition" => "130",
// "yPosition" => "233" )));
$signed_document_id = time();
// add a recipient and document to the envelope
$recipients = array( new DocuSign_Recipient( "1", "1", "I am", "my-email@my-email.in", $signed_document_id, 'signers', $tabs1) );
$documents = array( new DocuSign_Document("TEST.PDF", "1", file_get_contents("BCD.pdf")) , new DocuSign_Document("TEST.PDF", "2", file_get_contents("ABC.pdf")) );
// "sent" to send immediately, "created" to save as draft in your account
$status = 'sent';
//*** Create and send the envelope with embedded recipient
$response = $service->signature->createEnvelopeFromDocument( $emailSubject, $emailBlurb, $status, $documents, $recipients, array() );
/**************************************************/
/* Step- 3 Embadded sign iframe */
/**************************************************/
$service = new DocuSign_ViewsService($client);
$envelopeId = $response->envelopeId;
$returnUrl = "https://demo.docusign.com;
$authMethod = "email";
$response = $service->views->getRecipientView( $returnUrl,
$envelopeId,
"i am",
"my-email@my-email.in",
$signed_document_id,
$authMethod );
$sign_url = $response->url;
答案 0 :(得分:2)
是的,您可以让两个不同的人通过DocuSign签署文件,两者都在您的申请中签名。
这称为“嵌入式签名”。
请记住,当您启用某人在您的应用程序中进行签名时,您的应用程序将负责对签名者进行身份验证。
更多信息:请参阅recipe for embedded signing。