简体   繁体   English

如何使用docusign在文档中添加SignedDate选项卡?

[英]How to add SignedDate tab in document using docusign?

I want to add signed date tab on document using docusign. 我想使用docusign在文档上添加签名日期标签。 I know it using docusign api but don't know using only docusign class. 我知道使用docusign api,但不知道只使用docusign类。 Please tell me something about it. 请告诉我一些有关它的信息。 Here is what i try for that. 这是我为此尝试的。

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;

I found my question's answer myself. 我自己找到了问题的答案。 Here is a solution. 这是一个解决方案。 Just replace the above tab code with below new code. 只需将下面的标签代码替换为下面的新代码即可。

$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" ))
            );

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

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