GetGWCustomer
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 number assigned by the system. 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
public function GetGWCustomer()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-777',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$response = $client->GetGWCustomer(
array(
'securityToken' => $securityToken,
'customerId' => '123',
'customerToken' => '435456435',
'import' => true,
)
);
$result = $response->GetGWCustomerResult;
}
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header />
<soapenv:Body>
<ebiz:GetGWCustomer>
<ebiz:securityToken>
<ebiz:SecurityId>********-5ea6-425e-8343-994c126caa13</ebiz:SecurityId>
<ebiz:UserId />
<ebiz:Password />
</ebiz:securityToken>
<ebiz:customerId />
<ebiz:customerToken />
<ebiz:import>0</ebiz:import>
</ebiz:GetGWCustomer>
</soapenv:Body>
</soapenv:Envelope>
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<GetGWCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<GetGWCustomerResult>
<CustomerInternalId />
<Phone>8885007798</Phone>
<Fax />
<Email>[email protected]</Email>
<BillingAddress>
<FirstName>Kelly</FirstName>
<LastName>Johnson</LastName>
<CompanyName>CBS</CompanyName>
<Address1>33 Linsy Dr</Address1>
<Address2 />
<City>irvine</City>
<State>ca</State>
<ZipCode>92618</ZipCode>
<Country>usa</Country>
<IsDefault xsi:nil="true" />
</BillingAddress>
<ShippingAddress>
<IsDefault xsi:nil="true" />
</ShippingAddress>
<PaymentMethodProfiles>
<PaymentMethodProfile>
<MethodType>cc</MethodType>
<MethodID>326</MethodID>
<MethodName />
<SecondarySort>30113943</SecondarySort>
<Created>2018-06-14T04:59:03+00:00</Created>
<Modified>2018-06-14T04:59:03+00:00</Modified>
<AvsStreet>20</AvsStreet>
<AvsZip>92630</AvsZip>
<CardExpiration>2020-01</CardExpiration>
<CardNumber>XXXXXXXXXXXX2224</CardNumber>
<CardType>V</CardType>
<Balance>0</Balance>
<MaxBalance>0</MaxBalance>
<ReloadSchedule>{"cardholder":"cbstest"}</ReloadSchedule>
</PaymentMethodProfile>
</PaymentMethodProfiles>
<CustomerToken>8967254</CustomerToken>
</GetGWCustomerResult>
</GetGWCustomerResponse>
</s:Body>
</s:Envelope>
public void GetGWCustomer()
{
eBizService apiClient = new eBizService();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "********-c870-41b8-aa5c-205e55b7a049",
UserId = "",
Password = ""
};
var response = apiClient.GetGWCustomer(securityToken, "", "1f862cd9-c6a7-41b3-a2e7-226988095b41",false);
Console.WriteLine(response.CustomerInternalId);
Console.WriteLine(response.CustomerId);
Console.ReadLine();
}
Updated over 1 year ago