如何从嵌入式应用程序接收 returnurl 事件?
How can I receive returnurl events from embedded app?
我在没有 client_id 的情况下通过嵌入应用程序发送了信封。然后,我可以通过电子邮件查看信封,如果我在电子邮件中的信封上签名,是否有办法在嵌入应用程序上获取活动?
public Map<String,Object> createRecipientView(Map<String,Object> recipientInfo) {
Map<String,Object> result = new HashMap<String,Object>();
// instantiate a new EnvelopesApi object
EnvelopesApi envelopesApi = new EnvelopesApi();
// set the url where you want the recipient to go once they are done signing
RecipientViewRequest view = new RecipientViewRequest();
//view.setReturnUrl("https://www.docusign.com");
view.setReturnUrl(serverUrl+"/"+recipientInfo.get("usr_cls")+"/docusign/returnRecipientView.do?ds_usr_id="+recipientInfo.get("ds_usr_id") + "&docusign_id=" + recipientInfo.get("docusign_id")+ "&usr_cls=" + recipientInfo.get("usr_cls") + "&uiId=" +recipientInfo.get("uiId"));
view.setAuthenticationMethod("email");
// recipient information must match embedded recipient info we provided in step #2
String email = (String)recipientInfo.get("email");
String userName = (String)recipientInfo.get("usr_nm");
String recipientId = (String)recipientInfo.get("recipient_id");
String clientId = (String)recipientInfo.get("client_id");
String envelopeId = (String)recipientInfo.get("envelope_id");
view.setEmail(email);
view.setUserName(userName);
view.setRecipientId(recipientId);
//view.seta
//view.setClientUserId(clientId);
// call the CreateRecipientView API
ViewUrl recipientView;
try {
recipientView = envelopesApi.createRecipientView(accountId, envelopeId, view);
log.info("Signing URL = " + recipientView.getUrl());
result.put("url", recipientView.getUrl());
result.put("result_status", "S");
} catch (ApiException e) {
log.error("error : " + e.toString());
result.put("result_status", "F");
result.put("result_message", e.toString());
}
return result;
}
是的,您可以使用 webhook 将有关信封的通知发送到您的应用程序。
您可以阅读这篇 blog post 了解它。
你也可以看看这个code example.
这是从 here:
中获取的一些 C# 代码
EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition();
var eventNotification = new EventNotification();
\ Set up the endpoint URL to call (it must be using HTTPS and at least TLS1.1 or higher)
eventNotification.Url = "https:\myapp.somedomain.com";
\ DocuSign will retry on failure if this is set
eventNotification.RequireAcknowledgment = "true";
\ This would send the documents together with the event to the endpoint
eventNotification.IncludeDocuments = "true";
\ Allows you to see this in the DocuSign Admin Connect logs section
eventNotification.LoggingEnabled = "true";
var envelopeEvents = new List<EnvelopeEvent>();
\ In this case we only add a single envelope event, when the envelope is completed. You can also add events for recipients
envelopeEvents.Add(new EnvelopeEvent { EnvelopeEventStatusCode = "completed", IncludeDocuments = "true" });
eventNotification.EnvelopeEvents = envelopeEvents;
envelopeDefinition.EventNotification = eventNotification;
我在没有 client_id 的情况下通过嵌入应用程序发送了信封。然后,我可以通过电子邮件查看信封,如果我在电子邮件中的信封上签名,是否有办法在嵌入应用程序上获取活动?
public Map<String,Object> createRecipientView(Map<String,Object> recipientInfo) {
Map<String,Object> result = new HashMap<String,Object>();
// instantiate a new EnvelopesApi object
EnvelopesApi envelopesApi = new EnvelopesApi();
// set the url where you want the recipient to go once they are done signing
RecipientViewRequest view = new RecipientViewRequest();
//view.setReturnUrl("https://www.docusign.com");
view.setReturnUrl(serverUrl+"/"+recipientInfo.get("usr_cls")+"/docusign/returnRecipientView.do?ds_usr_id="+recipientInfo.get("ds_usr_id") + "&docusign_id=" + recipientInfo.get("docusign_id")+ "&usr_cls=" + recipientInfo.get("usr_cls") + "&uiId=" +recipientInfo.get("uiId"));
view.setAuthenticationMethod("email");
// recipient information must match embedded recipient info we provided in step #2
String email = (String)recipientInfo.get("email");
String userName = (String)recipientInfo.get("usr_nm");
String recipientId = (String)recipientInfo.get("recipient_id");
String clientId = (String)recipientInfo.get("client_id");
String envelopeId = (String)recipientInfo.get("envelope_id");
view.setEmail(email);
view.setUserName(userName);
view.setRecipientId(recipientId);
//view.seta
//view.setClientUserId(clientId);
// call the CreateRecipientView API
ViewUrl recipientView;
try {
recipientView = envelopesApi.createRecipientView(accountId, envelopeId, view);
log.info("Signing URL = " + recipientView.getUrl());
result.put("url", recipientView.getUrl());
result.put("result_status", "S");
} catch (ApiException e) {
log.error("error : " + e.toString());
result.put("result_status", "F");
result.put("result_message", e.toString());
}
return result;
}
是的,您可以使用 webhook 将有关信封的通知发送到您的应用程序。 您可以阅读这篇 blog post 了解它。 你也可以看看这个code example.
这是从 here:
中获取的一些 C# 代码EnvelopeDefinition envelopeDefinition = new EnvelopeDefinition();
var eventNotification = new EventNotification();
\ Set up the endpoint URL to call (it must be using HTTPS and at least TLS1.1 or higher)
eventNotification.Url = "https:\myapp.somedomain.com";
\ DocuSign will retry on failure if this is set
eventNotification.RequireAcknowledgment = "true";
\ This would send the documents together with the event to the endpoint
eventNotification.IncludeDocuments = "true";
\ Allows you to see this in the DocuSign Admin Connect logs section
eventNotification.LoggingEnabled = "true";
var envelopeEvents = new List<EnvelopeEvent>();
\ In this case we only add a single envelope event, when the envelope is completed. You can also add events for recipients
envelopeEvents.Add(new EnvelopeEvent { EnvelopeEventStatusCode = "completed", IncludeDocuments = "true" });
eventNotification.EnvelopeEvents = envelopeEvents;
envelopeDefinition.EventNotification = eventNotification;