developer:soap-1.6:methods:getsession

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:soap-1.6:methods:getsession [2012/08/04 10:10] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​
  
 +====== getSession ======
 +
 +Generate a session for fraud profiling.
 +
 +===== Description =====
 +
 +
 +This method generates a fraud profiling session. ​  Fraud profiling allows merchants to perform in depth analysis and business risk assessment using third party services such as Threat Metrix. ​  These premium services must be enabled on the merchants account before this method may be used.  ​
 +
 +The method returns a TransactionSession object which contains a session id and an org id.  These variables are used to assemble the profiling html snippet that needs to be displayed to the end user.   The session id is then passed in with the runTransaction,​ runSale, etc  call.
 +
 +See also [[getSession]],​ [[developer:​threatmetrix|ThreatMetrix Guide]]
 +===== Syntax =====
 +
 +[[..:​objects:​TransactionSession]] **getSession** ( [[..:​objects:​ueSecurityToken]] Token) ​
 +
 +
 +
 +===== Arguments =====
 +
 +^Type   ​^Name ​  ​^Description ​  ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and validate transaction.|
 +
 +
 +===== Return Value =====
 +
 +|[[..:​objects:​TransactionSession]] |Returns session data. |
 +
 +===== Exceptions =====
 +
 +The following exceptions (errors) are applicable to this method. ​
 +
 +^Code ^Message ​ ^Advice ​ ^
 +|20035 |Merchant does not have fraud profiling enabled |The merchant'​s account must be configured for fraud profiling. ​ They should contact their reseller to sign up for the service. |
 +
 +
 +
 +===== Examples =====
 +
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[..:​howto:​php|PHP Soap How-to]].
 +
 +<code php>
 +<?​php ​
 +
 +try { 
 +
 +
 +  $res=$client->​getSession($token);  ​
 +  print_r($data); ​
 +             
 +
 +
 +catch (SoapFault $e) { 
 +  die("​Get Session failed :" .$e->​getMessage()); ​
 +  } 
 +
 +?> 
 +</​code>​
 +
 +==== .NET VB ====
 +<code vb>
 +        Dim response As usaepay.TransactionSession
 +
 +        response = client.getSession(token,​ report, options, format)
 +        Dim binary_data As Byte() = Convert.FromBase64String(response)
 +
 +        MsgBox("​SessionID:​ " & response.SessionID);​
 +        ​
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +
 +            usaepay.TransactionSession response;
 +
 +            try
 +                {
 +                   ​response = client.getSession(token);​
 +
 +                   ​MessageBox.Show(response.SessionID);​
 +
 +                }
 +                catch (Exception err)
 +                {
 +                    MessageBox.Show(err.Message);​
 +                }
 +</​code>​
 +
 +===== Change History =====
 +
 +^Version ^Change ^
 +|[[developer:​soap-1.5:​methods:​getsession|1.5]] | Method added in this release |
developer/soap-1.6/methods/getsession.txt ยท Last modified: 2012/08/04 10:10 by tem

Page Tools