donglao9606
2014-05-29 18:39
浏览 111
已采纳

使用REST API进行Docusign实时帐户身份验证无效

I am new on Docusign. I have developed a application using REST API on PHP language. In demo account everything is working fine. But in live account does not working. Error is calling webservice and status is 0. I tried many way but can't solve. Please help me. My code for authentication is given below.

$integratorKey = 'xxxxxx';
    $email = 'xxxx';
    $password = 'xxxx';

    // construct the authentication header:
    $header = "<DocuSignCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></DocuSignCredentials>";


    $url = "https://www.docusign.net/restapi/v2/login_information";
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_HEADER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("X-DocuSign-Authentication: $header"));

    $json_response = curl_exec($curl);
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    //echo $status;
    if ( $status != 200 ) {
        echo "error calling webservice, status is:" . $status;
        exit(-1);
    }

    $response = json_decode($json_response, true);
    $accountId = $response["loginAccounts"][0]["accountId"];
    $baseUrl = $response["loginAccounts"][0]["baseUrl"];
    curl_close($curl);

图片转代码服务由CSDN问答提供 功能建议

我是Docusign的新手。 我在PHP语言上使用REST API开发了一个应用程序。 在模拟账户中一切正常。 但在真人帐户中不起作用。 错误是调用webservice并且状态为0.我尝试了很多方法但无法解决。 请帮我。 我的验证代码如下:

  $ integratorKey ='xxxxxx'; 
 $ email ='xxxx'; 
 $ password ='xxxx'; 
 \  n //构造身份验证标头:
 $ header =“&lt; DocuSignCredentials&gt;&lt; Username&gt;”  。  $ email。  “&LT; /用户名&gt;&LT;密码&gt;” 中 。  $密码。  “&LT; /密码和GT;&LT; IntegratorKey&gt;” 中 。  $ integratorKey。  “&lt; / IntegratorKey&gt;&lt; / DocuSignCredentials&gt;”; 
 
 
 $ url =“https://www.docusign.net/restapi/v2/login_information";
 $ curl = curl_init($ url)  ; 
 curl_setopt($ curl,CURLOPT_HEADER,false); 
 curl_setopt($ curl,CURLOPT_RETURNTRANSFER,true); 
 curl_setopt($ curl,CURLOPT_HTTPHEADER,array(“X-DocuSign-Authentication:$ header”)); \  n 
 $ json_response = curl_exec($ curl); 
 $ status = curl_getinfo($ curl,CURLINFO_HTTP_CODE); 
 // echo $ status; 
 if($ status!= 200){
 echo“错误调用 webservice,状态是:“。  $ status; 
 exit(-1); 
} 
 
 $ response = json_decode($ json_response,true); 
 $ accountId = $ response [“loginAccounts”] [0] [“accountId”];  
 $ baseUrl = $ response [“loginAccounts”] [0] [“baseUrl”]; 
 curl_close($ curl); 
   
 
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题