首页 > 解决方案 > 从我们的平台创建模板和设计,而不是登录到docusign

问题描述

我正在使用docusign php api,我可以在其中创建模板但签名者不起作用我也需要从我的平台更新所有内容,而不是登录到像esign,显示设计设计的docusign网站,一旦设计完成,它将发送没有docusign模板的邮件我们自己的邮件内容。

请帮帮我。

标签: docusignapi

解决方案


您没有提供代码或确切地提出问题。您需要帮助使用 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


推荐阅读