【发布时间】:2020-07-15 10:18:15
【问题描述】:
我的要求是:在网站上,用户可以点击【我们的】平台上的签字按钮,直接弹出要签字的文件,在文件上签字
目前根据DocuSign内嵌发送签名文档,我们使用JWT+admin授权方式获取访问_用户可以通过文档“envelopeviews: create recipient”打开文档URL并签名,
问题:
如果我们直接复制DocuSign URL,在浏览器中打开,页面会正确显示要签名的文档页面。如果签名URL嵌入在平台网页中,DocuSign会直接重定向到“envelopeviews: createrecipient”提交returnurl地址,参数event=send
我做错了什么
这里有一些细节:
List<Signers> signersList = new ArrayList<>();
signersList.add(signers);
signersList.add(signers1);
Recipients recipients = new Recipients();
recipients.setSigners(signersList);
dataJson.put("documents",docsignDocumentList);
dataJson.put("emailSubject",propertyName);
dataJson.put("recipients",recipients);
dataJson.put("status","sent");
String data = dataJson.toJSONString();
String envelopesJson = HttpDocusignUtils.httpPostJson("https://demo.docusign.net/restapi/v2.1/accounts/xxxx/envelopes",access_token,data);
log.info("envelopesJson:{}",envelopesJson);
JSONObject json_test = JSONObject.parseObject(envelopesJson);
String envelopeId=json_test.get("envelopeId").toString();
log.info("envelopeId:{}",envelopeId);
String Url="https://xxxxxx.com/?propertyId={propertyIdTemp}".replace("{propertyIdTemp}",propertyId);
JSONObject recipient_data = new JSONObject();
recipient_data.put("userName",signers.getName());
recipient_data.put("email",signers.getEmail());
recipient_data.put("recipientId","1");
recipient_data.put("clientUserId","2");
recipient_data.put("authenticationMethod","None");
recipient_data.put("returnUrl",Url);
System.out.println("sender_data==========="+recipient_data.toJSONString());
String results_recipient = HttpDocusignUtils.httpPostJson("https://demo.docusign.net/restapi/v2.1/accounts/xxxx/envelopes/{envelopeIdTemp}/views/sender".replace("{envelopeIdTemp}",envelopeId),access_token,recipient_data.toJSONString());
JSONObject results_senderJson = JSONObject.parseObject(results_recipient);
【问题讨论】:
标签: docusignapi