dongpao5261 2016-05-25 05:39
浏览 41
已采纳

DocuSign Embedded返回超时异常?

I have been using Docusign to embed signing in my UI using below PHP code. I have given correct credentials,

public function sign(){
                $username = "sample@sample.com";
                $password = "sample";
                $integrator_key = "1fsfd0658-zv95-4317-a016-d9f76eaasdff9";
                // DocuSign environment we are using
        $host = "https://demo.docusign.net/restapi";
        // create a new DocuSign configuration and assign host and header(s)
        $config = new \DocuSign\eSign\Configuration();
        $config->setHost($host);
        $config->addDefaultHeader("X-DocuSign-Authentication", "{\"Username\":\"" . $username . "\",\"Password\":\"" . $password . "\",\"IntegratorKey\":\"" . $integrator_key . "\"}");
        // instantiate a new docusign api client
        $apiClient = new \DocuSign\eSign\ApiClient($config);
        // we will first make the Login() call which exists in the AuthenticationApi...
        $authenticationApi = new \DocuSign\eSign\Api\AuthenticationApi($apiClient);
        // optional login parameters
        $options = new \DocuSign\eSign\Api\AuthenticationApi\LoginOptions();
        // call the login() API
            echo "djfnksd";
        $loginInformation = $authenticationApi->login($options);
        // parse the login results
        if(isset($loginInformation) && count($loginInformation) > 0)
        {
            // note: defaulting to first account found, user might be a 
            // member of multiple accounts
            $loginAccount = $loginInformation->getLoginAccounts()[0];
            if(isset($loginInformation))
            {
                $accountId = $loginAccount->getAccountId();
                if(!empty($accountId))
                {
                    echo "Account ID = $accountId
";
                }
            }
        }
            }

But getting error when calling that method,

ApiException in ApiClient.php line 233: API call to https://demo.docusign.net/restapi/v2/login_information timed out:

{
    "url": "https:\/\/demo.docusign.net\/restapi\/v2\/login_information",
    "content_type": null,
    "http_code": 0,
    "header_size": 0,
    "request_size": 0,
    "filetime": -1,
    "ssl_verify_result": 1,
    "redirect_count": 0,
    "total_time": 1.046,
    "namelookup_time": 0.515,
    "connect_time": 0.78,
    "pretransfer_time": 0,
    "size_upload": 0,
    "size_download": 0,
    "speed_download": 0,
    "speed_upload": 0,
    "download_content_length": -1,
    "upload_content_length": -1,
    "starttransfer_time": 0,
    "redirect_time": 0,
    "redirect_url": "",
    "primary_ip": "162.248.186.25",
    "certinfo": [],
    "primary_port": 443,
    "local_ip": "192.168.1.12",
    "local_port": 53163
}

I'm clueless , what could be the possible error ?

  • 写回答

1条回答 默认 最新

  • dtuy84033 2016-05-30 06:04
    关注

    It is working now. I solved the problem by removing ssh verification in ApiClient.php. By Commenting the below line

    // disable SSL verification, if needed
       // if ($this->config->getSSLVerification() == false) {
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
        //}
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题