-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwsHeartbeat.php
More file actions
executable file
·51 lines (47 loc) · 1.75 KB
/
Copy pathwsHeartbeat.php
File metadata and controls
executable file
·51 lines (47 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @copyright Copyright (C) DocuSign, Inc. All rights reserved.
*
* This source code is intended only as a supplement to DocuSign SDK
* and/or on-line documentation.
* This sample is designed to demonstrate DocuSign features and is not intended
* for production use. Code and policy for a production application must be
* developed to meet the specific data and security requirements of the
* application.
*
* THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*/
// start session and some helper functions
include("include/session.php");
$f1 = false;
$f2 = false;
$webserviceType = $_REQUEST['webservice'];
if ( $webserviceType == "credential") {
try {
include("Envelope.php");
$client = new SoapClient("https://demo.docusign.net/API/3.0/Credential.asmx?WSDL");
$arr = array();
$response = $client->Ping($arr);
if ($response->PingResult=="1") echo("true");
} catch (Exception $e) {
echo($e);
}
} else {
try {
$ini_array = parse_ini_file("Credentials.ini");
$IntegratorsKey = $ini_array["IntegratorsKey"];
$username = $_SESSION["Email"];
$password = $_SESSION["Password"];
$client = new SoapClient("https://demo.docusign.net/API/3.0/Credential.asmx?WSDL");
$arr = array("Email" => $username, "Password" => $password);
$response = $client->Login($arr);
if ($response->LoginResult->AuthenticationMessage=="Successful authentication") $f2 = true;
} catch (Exception $e) {
echo($e);
}
}
if ($f1 && $f2) echo("true");
?>