developer:soap-1.4:methods:getcustomer

Soap API v1.4

getCustomer

Retrieve the customer details for a given CustNum.

Description

This method allows you to view all of the stored data for a particular customer.

This method requires the use of the CustNum, a unique customer number assigned by the gateway. If you have lost or cannot remember the customer's CustNum, use the searchCustomers method to find the correct CustNum.

Customer details include CustNum (the gateway assigned customer number), CustID (merchant assigned customer ID), billing address, receipt settings, recurring billing settings, and other pertinent information.

See also runCustomerTransaction, enableCustomer, disableCustomer, deleteCustomer, searchCustomerID, searchCustomers, getCustomerHistory, addCustomer, addCustomerPaymentMethod, deleteCustomerPaymentMethod, updateCustomer, quickUpdateCustomer

Syntax

CustomerObject getCustomer ( ueSecurityToken Token, integer CustNum )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
integer CustNum Unique customer ID number assigned by the gateway.

Return Value

CustomerObject Returns customer information such as customer number, merchant assigned customer ID, billing address, receipt settings, recurring billing settings, and other pertinent information

Examples

PHP

For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

<?php 
 
try { 
 
  $custnum='532'; 
  print_r($client->getCustomer($token,$custnum)); 
 
} 
 
catch(SoapFault $e) { 
 
  echo $e->getMessage(); 
  echo "\n\nRequest: " . $client->__getLastRequest(); 
  echo "\n\nResponse: " . $client->__getLastResponse(); 
 
} 
 
?> 

Java

This example uses the USAePay Java library. For directions on how to install the library and create the token/client objects, go to either the Java JAX-RPC Howto or the Java JAX-WS Howto.

try {
  //Set custnum to the Customer Number of customer you want to retrieve.
  BigInteger custnum = new BigInteger("12345678");
 
  CustomerObject customer = new CustomerObject();
 
  customer = client.getCustomer(token, custnum);
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());
}

.NET VB

Dim custNum As String
        custNum = "103125"
 
        Dim customer As usaepay.CustomerObject
        customer = New usaepay.CustomerObject()
 
        customer = client.getCustomer(token, custNum)
 
        MsgBox(customer.CustomerID)

.NET C#

For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the C Sharp .Net Soap How-to.

string custNum = "89147";
 
            string response;
            usaepay.CustomerObject customer = new usaepay.CustomerObject();
 
            try
            {
                customer = client.getCustomer(token, custNum);
 
                MessageBox.Show(string.Concat("CustNum: ", customer.CustomerID));
 
 
            }
 
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

Change History

Version Change
1.1 Method added prior to soap-1.1
developer/soap-1.4/methods/getcustomer.txt · Last modified: 2010/09/09 11:26 by irina

Page Tools