GetCustomerToken
Find a customer number (assigned by the gateway) using a customer ID (assigned by the merchant).
Description
This method is used for the Customer ID (CustomerId is a customer identification number assigned by the merchant when the customer account is created) to find the gateway-assigned customer number (CustNum) associated with the customer's stored data.
Syntax
string GetCustomerToken( SecurityToken securityToken, string CustomerId, string customerInternalId)
Arguments
Type | Name | Description |
---|---|---|
SecurityToken | securityToken | Merchant security token: used to identify merchant and validate transaction. (required) |
string | CustomerId | Merchant-assigned customer ID. (required) |
string | customerInternalId | EBizCharge Connect-generated customer internal ID. (required) |
Return Value
function getCustomerToken(){
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '********-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$getCustomerToken = array(
'securityToken' => $securityToken,
'customerToken' => '9197504'
);
$getCustomerTokenResponse = $client->GetCustomerToken($getCustomerToken);
$getCustomerTokenResponseResult = $getCustomerTokenResponse->GetCustomerTokenResult;
}
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header/>
<soapenv:Body>
<ebiz:GetCustomerToken>
<ebiz:securityToken>
<ebiz:SecurityId>********-90b4-4a38-ad78-********</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:CustomerId>mm-055-03113</ebiz:CustomerId>
<ebiz:customerInternalId/>
</ebiz:GetCustomerToken>
</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">
<GetCustomerTokenResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<GetCustomerTokenResult>8606462</GetCustomerTokenResult>
</GetCustomerTokenResponse>
</s:Body>
</s:Envelope>
Updated over 2 years ago