Я пытаюсь отправить конверт после его создания, потому что я добавляю URL-адрес перенаправления для получателей.Как отправить конверт docusign позже после его создания с помощью PHP sdk
Я не могу найти способ отправки конверта, кроме функции 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 ($ ACCOUNTID, $ envelope_id); – smarmysam