deleteCustomer

Parent Previous Next

deleteCustomer

Delete the customer specified by CustNum.

 

Description

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.

 

Syntax

 

boolean deleteCustomer ( ueSecurityToken Token, integer CustNum )

 

Arguments

 

Type

Name

Description

ueSecurityToken

Token

Merchant security token: used to identify merchant and validate transaction.

integer

CustNum

A unique customer number assigned by the gateway.

 

Return Value

 

boolean

Returns confirmation of request only if successful. If request fails, an exception will be thrown.

 

Examples

 

PHP

 

<?php

try {        

 $custnum=$this->createCustomer();

 $res=$client->deleteCustomer($token, $custnum);    

 $this->assertTrue($res);  

}

catch(SoapFault $e) {

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

}

?>

 

 

Java

 

try {

 //Set CustNum for Customer you want to delete

 BigInteger CustNum = BigInteger("12345678");

 //Delete Customer

 client.deleteCustomer(token, CustNum);

} catch (Exception e) {

   System.out.println("Soap Exception: " + e.getMessage());

}

 

 

.NET VB

 

Dim custNum As String

       custNum = "103125"

       Dim response As Boolean

       response = client.deleteCustomer(token, custNum)

       MsgBox(response)

 

 

.NET C#

 

string custNum = "89792";

           Boolean response;

           try

           {

               response = client.deleteCustomer(token, custNum);

               if (response)

               {

                   MessageBox.Show(string.Concat("Succesfull"));

               }

               else MessageBox.Show(string.Concat("Error!"));

           }

           catch (Exception err)

           {

               MessageBox.Show(err.Message);

           }

: