docusignapi — Как отправить конверт docusign позже после его создания с помощью PHP SDK

Я пытаюсь отправить конверт после его создания, потому что я добавляю URL перенаправления в представление получателей.

Я не могу найти способ отправить конверт, кроме как в функции 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);
}

0

Решение

Конечно, вам просто нужно позвонить Конверты: обновление API с конвертом status установлен в sent, Необработанный запрос API выглядит следующим образом:

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

{
"status": "sent"}
0

Другие решения

Пользователи DocuSign PHP SDK:

$envelopeApi->update($accountId, $envelope_id, json_encode(['status' => 'sent']));
0

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector