developer:soap:methods:deletecustomer

Soap API v1.2

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.

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

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

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

<?php 
 
try {         
 
  $custnum=$this->createCustomer(); 
 
  $res=$client->deleteCustomer($token, $custnum);     
 
  $this->assertTrue($res);  
 
} 
 
catch(SoapFault $e) { 
 
  die("soap fault: " .$e->getMessage());  
 
} 
 
?> 

Java

This example uses the USAePay Java library. For directions on how to install the library and create the token/client objects, go to either the Java JAX-RPC Howto or the Java JAX-WS Howto.

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());
}
developer/soap/methods/deletecustomer.txt · Last modified: 2009/09/08 12:12 by charlie

Page Tools