[英]How do you send a docusign envelope later after it is created using PHP sdk
I'm trying to send an envelope after it is created because I'm adding a redirect url to recipients view. 创建信封后,我尝试发送信封,因为我向收件人视图添加了重定向网址。
I am unable to find a way to send the envelope except at createEnvelope function which depends on $envelop_definition->setStatus("sent")
; 我无法找到一种发送信封的方法,但createEnvelope函数除外,该函数取决于
$envelop_definition->setStatus("sent")
I am using DocuSign PHP sdk 我正在使用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);
}
Sure you just need to call the Envelopes: update API with the envelope status
set to sent
. 确保您只需要调用信封
status
为已sent
的信封status
更新 API。 The raw API request looks like: 原始API请求如下所示:
PUT /v2/accounts/{accountId}/envelopes/{envelopeId}
{
"status": "sent"
}
DocuSign PHP SDK用户:
$envelopeApi->update($accountId, $envelope_id, json_encode(['status' => 'sent']));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.