getCustomer

Parent Previous Next

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.

 

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

 

<?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

 

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 eBizCharge.CustomerObject

       customer = New eBizCharge.CustomerObject()

       customer = client.getCustomer(token, custNum)

       MsgBox(customer.CustomerID)

 

 

.NET C#

 

string custNum = "89147";

           string response;

           eBizCharge.CustomerObject customer = new eBizCharge.CustomerObject();

           try

           {

               customer = client.getCustomer(token, custNum);

               MessageBox.Show(string.Concat("CustNum: ", customer.CustomerID));

           }

           catch (Exception err)

           {

               MessageBox.Show(err.Message);

           }

: