com.indus.toolkit.authorizenet
Class CCInputHolder

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.indus.toolkit.authorizenet.CCInputHolder
All Implemented Interfaces:
java.io.Serializable

public class CCInputHolder
extends java.lang.Exception

Input holder object for Credit card.

See Also:
Serialized Form

Field Summary
static java.lang.String AUTH_CAPTURE
           
static java.lang.String AUTH_ONLY
           
static java.lang.String CAPTURE_ONLY
           
static java.lang.String CREDIT
           
static java.lang.String PRIOR_AUTH_CAPTURE
           
static java.lang.String VOID
           
 
Constructor Summary
CCInputHolder(java.lang.String amount, java.lang.String cardExpDate, java.lang.String cardNum, java.lang.String login, java.lang.String password)
          This constructor takes all the mandatory parameters.
 
Method Summary
 java.lang.String getParamString()
          Returns the parameter string for HTTP Post.
 boolean isTestRequest()
          Returns true if this is a test Request
 void setAddress(java.lang.String address)
          Sets the billing address
 void setAmount(java.lang.String amount)
          Sets the Amount for the transaction
 void setCardCode(java.lang.String cardCode)
          Sets the card code.
 void setCardExpDate(java.lang.String cardExpDate)
          Sets the expiration date for a credit card.
 void setCardNum(java.lang.String cardNum)
          Sets the credit card number.
 void setCity(java.lang.String city)
          Sets the billing city
 void setCompany(java.lang.String company)
          Sets the company name
 void setCountry(java.lang.String country)
          Sets the country name
 void setFirstName(java.lang.String firstName)
          Sets the first name
 void setLastName(java.lang.String lastName)
          Sets the last name
 void setLogin(java.lang.String login)
          Sets the login value
 void setPassword(java.lang.String password)
          Sets the password
 void setPhone(java.lang.String phone)
          Sets the phone number
 void setState(java.lang.String state)
          Sets the state
 void setTestRequest(boolean testReq)
          Sets a transaction for test.
 void setTransID(java.lang.String transID)
          Sets the transaction ID.
 void setType(java.lang.String type)
          Sets the transaction type.
 void setVersion(java.lang.String version)
          Sets the version of the server.
 void setZip(java.lang.String zip)
          Sets the billing zip code.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTH_CAPTURE

public static final java.lang.String AUTH_CAPTURE

AUTH_ONLY

public static final java.lang.String AUTH_ONLY

CAPTURE_ONLY

public static final java.lang.String CAPTURE_ONLY

CREDIT

public static final java.lang.String CREDIT

VOID

public static final java.lang.String VOID

PRIOR_AUTH_CAPTURE

public static final java.lang.String PRIOR_AUTH_CAPTURE
Constructor Detail

CCInputHolder

public CCInputHolder(java.lang.String amount,
                     java.lang.String cardExpDate,
                     java.lang.String cardNum,
                     java.lang.String login,
                     java.lang.String password)
This constructor takes all the mandatory parameters. All other parameters in the CCInputHolder object have a default value. You can override them by calling their setter methods.
Method Detail

getParamString

public java.lang.String getParamString()
Returns the parameter string for HTTP Post. This takes care of any embedded spaces and special http characters.

isTestRequest

public boolean isTestRequest()
Returns true if this is a test Request

setAddress

public void setAddress(java.lang.String address)
Sets the billing address

setAmount

public void setAmount(java.lang.String amount)
Sets the Amount for the transaction

setCardCode

public void setCardCode(java.lang.String cardCode)
Sets the card code. This is any valid CVV2 CVC2 value. It is usually a 3 or 4 digit number on the card.
Parameters:
cardCode - card code

setCardExpDate

public void setCardExpDate(java.lang.String cardExpDate)
Sets the expiration date for a credit card. This string is in the form: mmyy, mm/yy, or mm/yyyy

setCardNum

public void setCardNum(java.lang.String cardNum)
Sets the credit card number.

setCity

public void setCity(java.lang.String city)
Sets the billing city

setCompany

public void setCompany(java.lang.String company)
Sets the company name

setCountry

public void setCountry(java.lang.String country)
Sets the country name

setFirstName

public void setFirstName(java.lang.String firstName)
Sets the first name

setLastName

public void setLastName(java.lang.String lastName)
Sets the last name

setLogin

public void setLogin(java.lang.String login)
Sets the login value

setPassword

public void setPassword(java.lang.String password)
Sets the password

setPhone

public void setPhone(java.lang.String phone)
Sets the phone number

setState

public void setState(java.lang.String state)
Sets the state

setTestRequest

public void setTestRequest(boolean testReq)
Sets a transaction for test.
Parameters:
testReq - If true, the transaction will be treated as test and the credit card will not be charged. This setting overrides the account settings in Authorize.net. If you don't call this method, the value will be used from setting specified in your account at authorize.net

setTransID

public void setTransID(java.lang.String transID)
Sets the transaction ID. Used only if transaction type is CREDIT or PRIOR_AUTH_CAPTURE.

setType

public void setType(java.lang.String type)
Sets the transaction type. This must be one of the following strings. AUTH_CAPTURE, AUTH_ONLY, CAPTURE_ONLY, CREDIT, VOID, PRIOR_AUTH_CAPTURE.

setVersion

public void setVersion(java.lang.String version)
Sets the version of the server. Can be either 2.5, 3.0 or 3.1. If you don't call this function, it gets set to the default, which is is 3.0

setZip

public void setZip(java.lang.String zip)
Sets the billing zip code.