docusignapi - 从我们的平台创建模板和设计,而不是登录到docusign
问题描述
我正在使用docusign php api,我可以在其中创建模板但签名者不起作用我也需要从我的平台更新所有内容,而不是登录到像esign,显示设计设计的docusign网站,一旦设计完成,它将发送没有docusign模板的邮件我们自己的邮件内容。
请帮帮我。
解决方案
您没有提供代码或确切地提出问题。您需要帮助使用 PHP 创建模板。这是一些代码:
$config = new \DocuSign\eSign\Configuration();
$config->setHost($args['base_path']);
$config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']);
$api_client = new \DocuSign\eSign\ApiClient($config);
$templates_api = new \DocuSign\eSign\Api\TemplatesApi($api_client);
$options = new \DocuSign\eSign\Api\TemplatesApi\ListTemplatesOptions();
$options->setSearchText($this->template_name);
$results = $templates_api->listTemplates($args['account_id'], $options);
$created_new_template = false;
if ($results['result_set_size'] > 0) {
$template_id = $results['envelope_templates'][0]['template_id'];
$results_template_name = $results['envelope_templates'][0]['name'];
} else {
# Template not found -- so create it
# Step 2 create the template
$template_req_object = $this->make_template_req();
$results = $templates_api->createTemplate($args['account_id'], $template_req_object);
$template_id = $results['template_id'];
$results_template_name = $results['name'];
$created_new_template = true;
}
https://github.com/docusign/eg-03-php-auth-code-grant/blob/master/src/EG008CreateTemplate.php
推荐阅读
- node.js - 连接前端应用和后端应用(仅限 Javascript)
- javascript - 未处理的拒绝(TypeError):无法读取未定义的属性“销毁”
- python - 如何提取具有非零列值的行?
- c++ - c++中的`std::list`和boost库`boost::ptr_list`有什么区别吗?
- oracle - 在未找到 Oracle 数据库客户端库时避免出现恐慌
- amazon-s3 - 为什么带有/不带有“--compressed”标志的 curl 调用之间的缓存控制值不同?
- python - pyinstaller编译为exe后仍然允许更改的外部配置文件?
- php - 记录但不重定向
- c++ - 如何更改正在运行的 Boost::ASIO udp 套接字的端口
- php - 重定向回来 withInput() 输出控制中的数据