コード例 #1
0
function getTransactionAPIProxy($user = null, $password = null)
{
    global $IntegratorsKey, $api_wsdl, $api_options;
    if ($user === null && isset($_SESSION["UserID"])) {
        $user = $_SESSION["UserID"];
    }
    if ($password === null && isset($_SESSION["Password"])) {
        $password = $_SESSION["Password"];
    }
    $api = new APIService($api_wsdl, $api_options);
    // set credentials on the api object - if we have an integrator key then we prepend that to the UserID
    if (isset($IntegratorsKey) && $IntegratorsKey != "") {
        $api->setCredentials("[" . $IntegratorsKey . "]" . $user, $password);
    } else {
        $api->setCredentials($user, $password);
    }
    return $api;
}
コード例 #2
0
function getTransactionAPIProxy($user = null, $password = null)
{
    global $IntegratorsKey, $api_wsdl, $api_options;
    if ($user === null && isset($_SESSION["UserID"])) {
        $user = $_SESSION["UserID"];
    }
    if ($password === null && isset($_SESSION["Password"])) {
        $password = $_SESSION["Password"];
    }
    // get Integrator Key from credentials.ini
    $ini_array = parse_ini_file("integrator.php");
    $IntegratorsKey = $ini_array["IntegratorsKey"];
    if (!isset($IntegratorsKey) || $IntegratorsKey == "") {
        $_SESSION["errorMessage"] = "Please make sure integrator key is set (in integrator.php).";
        header("Location: error.php");
        die;
    }
    $api = new APIService($api_wsdl, $api_options);
    // set credentials on the api object - if we have an integrator key then we prepend that to the UserID
    $api->setCredentials("[" . $IntegratorsKey . "]" . $user, $password);
    return $api;
}
コード例 #3
0
// user credentials
include_once "include/creds.php";
//=============================================================================
// helper constants
//=============================================================================
// TODO: put in a test recipient email
$_apiRecipient1Email = "";
// TODO: put in users name
$_apiUserName = "";
//=============================================================================
// Set up the API
//=============================================================================
$_apiEndpoint = "https://demo.docusign.net/api/3.0/api.asmx";
$_apiWsdl = "api/APIService.wsdl";
$api_options = array('location' => $_apiEndpoint, 'trace' => true, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
$api = new APIService($_apiWsdl, $api_options);
$api->setCredentials("[" . $IntegratorsKey . "]" . $UserID, $Password);
//=============================================================================
// helper functions
//=============================================================================
/**
 * Creates one signer recipient
 * @return array of one Recipient
 */
function createOneSigner()
{
    global $_apiRecipient1Email;
    $rcp1 = new Recipient();
    // First recipient to put in recipient array
    $rcp1->UserName = "******";
    $rcp1->Email = $_apiRecipient1Email;
コード例 #4
0
// start session and some helper functions
include "include/session.php";
// credential service proxy classes and soapclient
include "api/CredentialService.php";
// api service proxy classes and soapclient
include "api/APIService.php";
// redirect to setup page if we aren't logged in
loginCheck("../login.php");
// get Integrator Key from credentials.ini
$ini_array = parse_ini_file("integrator.php");
$IntegratorsKey = $ini_array["IntegratorsKey"];
// setup api connection
$api_endpoint = "https://demo.docusign.net/api/3.0/api.asmx";
$api_wsdl = "api/APIService.wsdl";
$api_options = array('location' => $api_endpoint, 'trace' => true, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
$api = new APIService($api_wsdl, $api_options);
// set credentials on the api object - if we have an integrator key then we prepend that to the UserID
if (isset($IntegratorsKey) && $IntegratorsKey != "") {
    $api->setCredentials($IntegratorsKey . $_SESSION["UserID"], $_SESSION["Password"]);
} else {
    $api->setCredentials($_SESSION["UserID"], $_SESSION["Password"]);
}
$RequestStatusesParams = new RequestStatuses();
/*
$RequestStatusesParams->EnvelopeStatusFilter->UserInfo->UserName = $_SESSION["UserName"];
$RequestStatusesParams->EnvelopeStatusFilter->UserInfo->Email = $_SESSION["Email"];
$RequestStatusesParams->EnvelopeStatusFilter->AccountId = $_SESSION["AccountID"];
$RequestStatusesParams->EnvelopeStatusFilter->Statuses->Status = "Any";
*/
$RequestStatusParams = new RequestStatus();
$RequestStatusParams->EnvelopeID = $_SESSION["EnvelopeID"];
コード例 #5
0
ファイル: index.php プロジェクト: larryu/magento-b2b
<?php

require_once dirname(__FILE__) . '/bootstrap.php';
$service = new APIService(true);
$service->run();
コード例 #6
0
    $_SESSION["UserName"] = $response->LoginResult->Accounts->Account[0]->UserName;
    $_SESSION["Email"] = $response->LoginResult->Accounts->Account[0]->Email;
    $_SESSION["AccountName"] = $response->LoginResult->Accounts->Account[0]->AccountName;
    $_SESSION["AccountID"] = $APIAccountID;
    $_SESSION["Password"] = $password;
    $_SESSION["APIHost"] = $APIHost;
    if ($IntegratorsKey != "") {
        $_SESSION["IntegratorsKey"] = $IntegratorsKey;
    }
    $_SESSION["CredentialsSet"] = true;
}
// setup api connection
$api_endpoint = $_SESSION["APIHost"] . "/api/3.0/api.asmx";
$api_wsdl = "api/APIService.wsdl";
$api_options = array('location' => $api_endpoint, 'trace' => true, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
$api = new APIService($api_wsdl, $api_options);
// set credentials on the api object - if we have an integrator key then we prepend that to the UserID
if (isset($_SESSION["IntegratorsKey"]) && $_SESSION["IntegratorsKey"] != "") {
    $api->setCredentials("[" . $_SESSION["IntegratorsKey"] . "]" . $_SESSION["UserID"], $_SESSION["Password"]);
} else {
    $api->setCredentials($_SESSION["UserID"], $_SESSION["Password"]);
}
// functions
// helper function to make tabs
function MakeTab($docID, $recID, $PageNumber, $X = null, $Y = null, $Type, $Name = null, $TabLabel = null, $Value = null, $AnchorTabString = null, $AnchorXOffset = null, $AnchorYOffset = null)
{
    $tab = new Tab();
    $tab->DocumentID = $docID;
    $tab->RecipientID = $recID;
    $tab->PageNumber = $PageNumber;
    if (isset($X)) {
コード例 #7
0
    $Recipient->Email = $email;
    $Recipient->UserName = "******";
    $Recipient->ID = "2";
    $Recipient->RoleName = "CC";
    $Recipient->Type = "CarbonCopy";
    $Recipient->RequireIDLookup = false;
    return $Recipient;
}
// get Integrator Key from credentials.ini
$ini_array = parse_ini_file("integrator.php");
$IntegratorsKey = $ini_array["IntegratorsKey"];
// setup api connection
$api_endpoint = "https://demo.docusign.net/api/3.0/api.asmx";
$api_wsdl = "api/APIService.wsdl";
$api_options = array('location' => $api_endpoint, 'trace' => true, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
$api = new APIService($api_wsdl, $api_options);
// set credentials on the api object - if we have an integrator key then we prepend that to the UserID
if (isset($IntegratorsKey) && $IntegratorsKey != "") {
    $api->setCredentials($IntegratorsKey . $_SESSION["UserID"], $_SESSION["Password"]);
} else {
    $api->setCredentials($_SESSION["UserID"], $_SESSION["Password"]);
}
// main page loop
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (isset($_POST["Submit"])) {
        // setup recipient. This varies depending on whether we have selected Embedded Signing or Embedded Sending
        $Recipient = makeRecipient();
        // set any selected security options on the recipient
        if (isset($_POST['AuthenticationMethod']) && $_POST["AuthenticationMethod"] == "IDLookup") {
            $Recipient->RequireIDLookup = true;
            $Recipient->IDCheckConfigurationName = "ID Check \$";
コード例 #8
0
ファイル: utils.php プロジェクト: virsoni/DocuSign-SOAP-SDK
/**
 * Gets APIService SOAP client proxy that uses SOAP header authentication
 * @return APIService
 */
function getAPI()
{
    loginCheck();
    global $api_endpoint;
    $api_wsdl = "api/APIService.wsdl";
    $api_options = array('location' => $api_endpoint, 'trace' => true, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
    $api = new APIService($api_wsdl, $api_options);
    $api->setCredentials("[" . $_SESSION["IntegratorsKey"] . "]" . $_SESSION["UserID"], $_SESSION["Password"]);
    return $api;
}
	function getAPI() {
	    global $api_endpoint;
	    global $IntegratorsKey;
	    global $UserID;
	    global $Password;
	    
	    $api_wsdl = "api/APIService.wsdl";
	    $api_options =  array('location'=>$api_endpoint,'trace'=>true,'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
	    $api = new APIService($api_wsdl, $api_options);
	    $api->setCredentials("[" . $IntegratorsKey . "]" . $UserID, $Password);
	    
	    return $api;
	}