enableCustomer

Parent Previous Next

enableCustomer

Enable recurring billing for a customer specified by CustNum.

 

Description

This method allows you to begin a recurring billing cycle for an individual customer using their CustNum (unique customer number assigned by the gateway) as a reference. If you have lost or cannot remember the customer's CustNum, use the searchCustomerID method to retrieve it.

The recurring billing cycle can begin on any date you choose and can be set to any of the following cycles: Daily, Weekly, Bi-Weekly (every 2 weeks), Monthly, Bi-Monthly (every 2 months), Quarterly, Bi-Annually (every 6 months), and Annually.

You can also set the start and end dates, amount to be charged, and the total number of transactions for the recurring billing cycle.

Once a customer has been added to a recurring billing cycle, you can monitor and change the recurring billing settings from within the merchant console.

You can disable a customer's recurring billing cycle at any time using the disableCustomer method.

For more information about recurring billing, please refer to the support documentation in the merchant console.

 

Syntax

boolean enableCustomer ( 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 result of recurring billing request. Possible values are: Approved, Error, or Declined.

 

Examples

 

PHP

 

 

<?php

try {

 $custnum="12345678";

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

 }

catch(SoapFault $e) {

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

 }

?>

 

 

Java

 

try {

 //Set CustNum for the Customer that you want to enable

 BigInteger CustNum = new BigInteger("12345678");

 client.enableCustomer(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.enableCustomer(token, custNum)

       MsgBox(response)

 

.NET C#

 

 

string custNum = "89147";

           Boolean response;

           try

           {

               response = client.enableCustomer(token, custNum);

               if (response)

               {

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

               }

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

           }

           catch (Exception err)

           {

               MessageBox.Show(err.Message);

           }

: