我試圖在創建信封之後發送信封,因爲我將重定向網址添加到收件人視圖。如何在使用PHP sdk創建後再發送docusign信封
我無法找到發送信封的方式,除了在createEnvelope函數中取決於$envelop_definition->setStatus("sent")
;
我使用的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);
}
$收件人= $ envelopeApi-> listRecipients($帳戶ID,$ envelope_id); – smarmysam