searchCustomerID

Find a CustNum (assigned by the gateway) using a CustID (assigned by merchant).

Description

This method allows you to use the CustID - a customer identification number assigned by the merchant at the time the customer account is created - to find the gateway assigned CustNum associated with the customer's stored data.

The CustNum is required for several customer data storage management methods, including addCustomerPaymentMethod, updateCustomer, and deleteCustomer.

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

Syntax

string searchCustomerID ( ueSecurityToken Token, string CustID )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
string CustID Merchant assigned Customer ID.

Return Value

Type Description
string Returns the requested CustNum.

Examples

PHP

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

    <?php

    try {

      $CustID = "21021";

      $CustNum = $client->searchCustomerID(token, $CustID);

      $this->assertEquals($CustNum, "1222");

      }

    catch(SoapFault $e) {

      die("soap fault: " .$e->getMessage());         

      }

    ?>

.NET VB

    Dim custID As String
            custID = "123456"

            Dim response As String

            response = client.searchCustomerID(token, custID)
            MsgBox(response)

.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 custID = "123456";

                string response;

                try
                {
                    response = client.searchCustomerID(token, custID);

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


                }

                catch (Exception err)
                {
                    MessageBox.Show(err.Message);
                }

XML

Request:

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="urn:newtek"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <ns1:searchCustomerID>
    <Token xsi:type="ns1:ueSecurityToken">
    <ClientIP xsi:type="xsd:string">123.123.123.123</ClientIP>
    <PinHash xsi:type="ns1:ueHash">
    <HashValue xsi:type="xsd:string">41e7d8ace19560b582699e53ac83b784c5fe911c</HashValue>
    <Seed xsi:type="xsd:string">11039155194-test</Seed>
    <Type xsi:type="xsd:string">sha1</Type>
    </PinHash>
    <SourceKey xsi:type="xsd:string">_B4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
    </Token>
    <CustID xsi:type="xsd:string">1861505359</CustID>
    </ns1:searchCustomerID>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

Response:

    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="urn:newtek"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <ns1:searchCustomerIDResponse>
    <searchCustomerIDReturn xsi:type="xsd:string">4606609</searchCustomerIDReturn>
    </ns1:searchCustomerIDResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>