首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Docusign批量发送使用php客户端

Docusign批量发送使用php客户端
EN

Stack Overflow用户
提问于 2019-05-07 13:58:13
回答 1查看 111关注 0票数 2

我已经使用docusign php客户端实现了批量发送。我收到以下错误消息

{ "errorCode":"UNSPECIFIED_ERROR","message":“值不能为空,参数名:”}

当我在源代码下面运行时。

$templateId = 'd756f973-...';
$apiClient  = $this->getDocuSignClient();

// Get Template
$templatesApi = new TemplatesApi($apiClient);
$templateDetails = $templatesApi->get($this->getAccountId(), $templateId);

// Set documents
...

// Receipient
$signer = new Signer();
$signer->setIsBulkRecipient('true');
$signer->setRecipientId('1');

$recipients = new Recipients();
$recipients->setSigners([$signer]);

// Create draft template

$envelopDefinition = new EnvelopeDefinition();
$envelopDefinition->setStatus('created');
$envelopDefinition->setDocuments($documents);
$envelopDefinition->setRecipients($recipients);
$envelopDefinition->setEmailSubject('Sign bulk send');

$envelopeApi = new EnvelopesApi($apiClient);
$envelopSummary = $envelopeApi->createEnvelope($this->getAccountId(), $envelopDefinition);

// Update bulk recipients

$clients = Client::all();
$bulkRecipients = [];

foreach ($clients as $client) {
    $bulkRecipient = new BulkRecipient();
    $bulkRecipient->setEmail($client->email);
    $bulkRecipient->setName($client->first_name);

    $bulkRecipients[] = $bulkRecipient;
}

$bulkRequest = new BulkRecipientsRequest();
$bulkRequest->setBulkRecipients($bulkRecipients);

$bulkEnvelopesApi = new BulkEnvelopesApi($apiClient);
$bulkEnvelopesApi->updateRecipients($this->getAccountId(), $envelopSummary['envelope_id'], '1', $bulkRequest);
// ---------- the error message throws on above line ----------

感谢您的帮助。提前感谢

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56016343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档