【问题标题】:How to implement docusign rest api in php for creating envelop with eventnotification in json?如何在php中实现docusign rest api以在json中创建带有事件通知的信封?
【发布时间】:2022-01-13 08:38:57
【问题描述】:

如何实现docusign嵌入式签名(REST API PHP)以创建带有json正文/格式的模板角色、选项卡和事件通知(用于获取签名状态的webhook)的信封?如何获得签名状态?

【问题讨论】:

    标签: docusignapi webhooks


    【解决方案1】:

    这是从博客post on this topic 中获取的一些代码 为此,您将需要 DocuSign.eSign PHP Package (PHP SDK)。

    $envelopeDefinition = new \DocuSign\eSign\Model\EnvelopeDefinition();
    $eventNotification = new \DocuSign\eSign\Model\EventNotification();
    # Set up the endpoint URL to call (it must be using HTTPS and at least TLS1.1 or higher)
    $eventNotification->setUrl('https:\\myapp.somedomain.com');
    # DocuSign will retry on failure if this is set
    $eventNotification->setRequireAcknowledgment('true');
    # This would send the documents together with the event to the endpoint
    $eventNotification->setIncludeDocuments('true');
    # Allows you to see this in the DocuSign Admin Connect logs section
    $eventNotification->setLoggingEnabled('true');
    $envelopeEvents = [];
    # In this case we only add a single envelope event, when the envelope is completed. You can also add events for recipients
    $envelopeEvent = new \DocuSign\eSign\Model\EnvelopeEvent();
    $envelopeEvent->setEnvelopeEventStatusCode('completed'), 
    $envelopeEvent->setIncludeDocuments('true');
    array_push($envelopeEvents, $envelopeEvent);   
    $eventNotification->setEnvelopeEvents($envelopeEvents);
    $envelopeDefinition->setEventNotification($eventNotification);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多