GetCustomer
Description
This method is used to view all of the stored data for a particular customer. It requires the use of customerId or customerInternalId, a unique customer Id assigned by EBizCharge. If you have lost or cannot remember the customerInternalId, use the searchCustomers method to find the correct customerInternalId.
Syntax
Customer GetCustomer(SecurityToken securityToken, string customerId, string customerInternalId)
Arguments
Type | Name | Description |
---|---|---|
SecurityToken | securityToken | Merchant security token: used to identify merchant and validate transaction. (required) |
String | customerInternalId | Unique customer ID number assigned by the internal system. (required) |
String | customerId | Customer ID. (required) |
Return Value
Type | Description |
---|---|
Customer | Returns customer information, such as customer number, merchant-assigned customer ID, billing address, receipt settings, recurring billing settings, and other pertinent information. |
Examples
function getCustomer()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$getCustomer = array(
'securityToken' => $securityToken,
'customerId' => '1'
);
$getCustomer = $client->GetCustomer($getCustomer);
$getCustomerResult = $getCustomer->GetCustomerResult;
}
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header/>
<soapenv:Body>
<ebiz:GetCustomer>
<ebiz:securityToken>
<ebiz:SecurityId>********-90b4-4a38-ad78-********</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:customerInternalId>
</ebiz:customerInternalId>
<ebiz:customerId>mm-0011-01</ebiz:customerId>
</ebiz:GetCustomer>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<GetCustomerResult>
<CustomerInternalId>********-20a4-42d7-af21-********</CustomerInternalId>
<CustomerId>mm-0011-01</CustomerId>
<FirstName>Jack</FirstName>
<LastName>Smith</LastName>
<CompanyName>CBS</CompanyName>
<Phone>18887777797</Phone>
<CellPhone>7143581268</CellPhone>
<Fax>8885557798</Fax>
<Email>[email protected]</Email>
<WebSite>centurybizsolutions.net</WebSite>
<BillingAddress>
<FirstName>Jack</FirstName>
<LastName>Smith</LastName>
<CompanyName>CBS</CompanyName>
<Address1>50 Golden</Address1>
<Address2/>
<City>Abyss</City>
<State>CA</State>
<ZipCode>56789</ZipCode>
</BillingAddress>
</GetCustomerResult>
</GetCustomerResponse>
</s:Body>
</s:Envelope>
public void GetCustomer()
{
eBizService apiClient = new eBizService();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "*******-c870-41b8-aa5c-********",
UserId = "",
Password = ""
};
var response = apiClient.GetCustomer(securityToken, "", "********-c6a7-41b3-a2e7-********");
Console.WriteLine(response.CustomerInternalId);
Console.WriteLine(response.CustomerId);
Console.ReadLine();
}
Updated about 1 year ago