我想使用docusign在文档上添加签名日期选项卡。我知道它使用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' => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 'email' => "xxxxxxxxxxxxxxxxxxxxxxx", 'password' => "xxxxxxxxxxxxxxxxxxxxxxx",
// 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.";
$tabs1 = array( "signHereTabs" => array(
array( "documentId" => "1",
"pageNumber" => $pageNumber,
"xPosition" => "130",
"yPosition" => "533" )));
$signed_document_id = time();
echo "Signed_document_id = " . $signed_document_id;
echo "<br>";
// add a recipient and document to the envelope
$recipients = array( new DocuSign_Recipient( "1", "1", "my-name", "my-name@my-email.com", $signed_document_id, 'signers', $tabs1));
$documents = array( new DocuSign_Document("TEST.PDF", "1", file_get_contents($file_path)) );
// "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() );
$envelopeId = $response->envelopeId;
答案 0 :(得分:0)
我发现自己的问题已经回答了。这是一个解决方案。只需用以下新代码替换上面的标签代码即可。
$tabs1 = array( "signHereTabs" => array(
array( "documentId" => "1",
"pageNumber" => $pageNumber,
"xPosition" => "130",
"yPosition" => "533" )),
"initialHereTabs" => array(
array( "documentId" => "1",
"pageNumber" => $pageNumber,
"xPosition" => "130",
"yPosition" => "633" )),
"dateSignedTabs" => array(
array( "documentId" => "1",
"pageNumber" => $pageNumber,
"xPosition" => "130",
"yPosition" => "733" ))
);