2017-02-21 3 views
0

受信者にリダイレクトURLを追加しているため、作成後に封筒を送信しようとしています。docusign封筒をPHP sdkを使用して作成した後にどのように送付しますか

$envelop_definition->setStatus("sent")に依存するcreateEnvelope機能以外では封筒を送信する方法が見つかりません。

私はあなただけsentに封筒statusセットでEnvelopes: update APIを呼び出す必要がDocuSignのPHP sdk

$envelop_definition = new DocuSign\eSign\Model\EnvelopeDefinition(); 
$envelop_definition->setEmailSubject($subject); 
$envelop_definition->setTemplateId($templateid); 
$envelop_definition->setTemplateRoles($templateRoles); 
//$envelop_definition->setStatus("sent"); 

$options = new \DocuSign\eSign\Api\EnvelopesApi\CreateEnvelopeOptions(); 
$options->setCdseMode(null); 
$options->setMergeRolesOnDraft(null); 

// create and send the envelope (aka signature request) 
$envelop_summary = $envelopeApi->createEnvelope($accountId, $envelop_definition, $options); 
$envelop_summary = json_decode($envelop_summary); 
if(!empty($envelop_summary)){ 
// set the returnURL 
$envelope_id = $envelop_summary->envelopeId; 
$url = 'http://www.mywebsite.com/docusign/helloworld.html?envelope_id=' . $envelope_id; 

foreach ($recipients->getSigners() as $recipient) { 
    $recipient_view_request = new \DocuSign\eSign\Model\RecipientViewRequest(); 
    // set where the recipient is re-directed once they are done signing 
    recipient_view_request->setReturnUrl($url); 
} 
+0

$受信者= $ envelopeApi-> listRecipients($ accountIdを、$ envelope_id)。 – smarmysam

答えて

0

は確かに使用しています。生のAPIリクエストは次のようになります。

PUT /v2/accounts/{accountId}/envelopes/{envelopeId} 

{ 
    "status": "sent" 
} 
0

DocuSignのPHP SDKユーザー:

$envelopeApi->update($accountId, $envelope_id, json_encode(['status' => 'sent'])); 
関連する問題