【发布时间】:2020-03-20 15:35:16
【问题描述】:
我一直在阅读 PHP DocuSign API,因为我想要完成的是使用表单数据预填充模板选项卡,以便当用户签署文档时,许多字段已经完成.
我正在使用以下 Laravel 包:https://github.com/Tucker-Eric/Laravel-Docusign
这允许您使用初始化的 Client 对象来访问 API 端点,例如:
$this->client->envelopes$this->client->customTabs
我认为我很愚蠢,但我认为我能够获取自定义字段,获取它们的 ID,然后填充它们。
示例
// Populate the template data attributes
$templateRole = $this->client->templateRole([
'email' => 'jesseorange360@gmail.com',
'name' => 'Jesse Orange',
'role_name' => '[ROLE_NAME]',
'tabs' => [
'textTabs' => [
[
'tabLabel' => 'ApplicantName',
'value' => 'John Doe',
],
],
],
]);
// Define the DocuSign envelope
$envelopeDefinition = $this->client->envelopeDefinition([
'status' => 'sent',
'email_subject' => 'Please sign your life away.',
'template_id' => $templateId,
'template_roles' => [
$templateRole,
],
]);
// Create the DocuSign envelope
$envelopeSummary = $this->client->envelopes->createEnvelope($envelopeDefinition);
但根据 API 文档,您必须像这样手动创建和填写这些字段:
https://developers.docusign.com/esign-rest-api/code-examples/set-template-tab-values
我正在尝试做的事情真的可能吗?
【问题讨论】:
标签: php laravel docusignapi