Main Web API Documentation Information
Actual Page/Function Name:
validateAndFormatCardData
Human Readable Name or Caption:
Validate And Format Card Data
Page/Function Description:
This method will validate and format the credit card data. This method does not do the actual transaction but it does do all of the prep work for it.
Page/Function Output Type:
API - JSON or WDDX
Categories:
eComm
Extra Page/Function Notes:


Parameters
Scope Name Type Default Description Required Alternates Known Values
Arguments ACTUAL_SWIPE_DATA String Pass in the actual card swipe data if used. No
Arguments AMOUNT Numeric 0 Pass in the amount for the transaction. No
Arguments CC_EXP_DATE String Pass in the credit card expiration date. This should be in the mmyy format. Yes
Arguments CC_NUMBER String Pass in the credit card number. The acceptable character length is from 13-16 characters long, so do not include spaces or dashes. Yes
Arguments CC_THREE_DIGIT String Pass in the credit card 3 or 4 digit CCV number. This can be found on the back of the card and is also called a security code. No
Arguments NAME_ON_CARD String Pass in the name on the credit card. Yes
Arguments STREET_ADDRESS String Pass in the street address of the card holder. No
Arguments ZIP_ADDRESS String Pass in the zip code of the card holder. No


Results
RET_STATUS RET_MAIN_MESSAGE RET_SECOND_MESSAGE Redirect Link Description
ok success This assumes that everything went well.
Name Type Description Notes
ACTUAL_SWIPE_DATA String This is the actual returned data from the card swipe. This data is validated as an argument and then returned.
AMOUNT Decimal This is the dollar amount for the transaction. This data is validated as an argument and then returned.
CC_EXP_DATE String This is a four digit date in the MMYY format, for example "0315" for March 2015. This data is validated as an argument and then returned.
CC_EXP_MONTH String This is the two-digit credit card expiration month. This is taken from the four digit expiration date.
CC_EXP_YEAR String This is the two-digit credit card expiration year. This is taken from the four-digit expiration date.
CC_NUMBER String This is the credit card number. This is taken from the arguments, run through some length and format validation, and returned.
CC_THREE_DIGIT String This is the 3 or 4 digit CCV number. This is input as an argument, goes through some validation, and is returned.
LAST_FOUR_OF_CC String This is the last four digits of the credit card number. This is created by taking trimming the last four digits in the credit card number argument.
NAME_ON_CARD String This is the person's name on the credit card. This is entered as an argument, run through length validation, and returned.
STREET_ADDRESS String This is the street address of the credit card holder. This is input as an argument, run through length validation, and returned.
USE_MONEY_TYPE_ID Numeric This is a number to determine what type of money or credit card is used. For example, 7 is for Visa, 6 for MasterCard, 5 for Discover, 4 for Amex, etc.
USE_MONEY_TYPE_NAME String This is the name of the money type, for example, the type of credit card. Some examples are Visa, MasterCard, Discover, Amex, etc.
USE_TRACK_1 String This is part of the actual swipe data. This is only populated if there is an actual transaction.
USE_TRACK_2 String This is part of the actual swipe data. This is only populated if there is an actual transaction.
ZIP_ADDRESS String This is the card holder's zip code. This is entered as an argument, run through some validation, and returned.
negativeAmountIn Problem with the amount field. All values must be positive for this page to function. See below. Negative numbers indicate a credit and/or refund. In order to protect all parties (security dealing with giving out monies), all credits and/or refunds need to be done through your actual merchant account. Please login to your merchant account and then return to the invoice/cart payment page and record the authorization code manually. Use your back button and try again. This is returned if the "amount" argument is a negative value.
creditCardNum The credit card number must be numeric. Please check your entry. Use your back button and try again. This is returned if the credit card number is not numeric.
creditCardIn The credit card number must be no less than 13 digits and no greater than 16 digits. Please check your entry. Use your back button and try again. This is returned if the credit card number is not within the length requirements.
firstNumberCheck Unable to determine the type of credit card you are submitting. Acceptable formats are Visa, MasterCard, Discover, and American Express. Use your back button and try again. This is returned if the validation determines that the credit card wasn't a Visa, MasterCard, Discover, or American Express.
creditCardExpiryDate The credit card expiration date must be numeric. Use the "mmyy" format. Please check your entry. An example might be 0315 where 03 is the month and 15 is the year. Use your back button and try again. This is returned if the input credit card expiration date wasn't numeric.
expirationIn The credit card expiration date must be numeric. We are looking for the "mmyy" format. Please check your entry. An example might be 0315 where 03 is the month and 15 is the year. Use your back button and try again. This is returned if the input expiration date isn't a four digit string.
monthCheck Problem with the expiration date month. Valid numbers are between 01 and 12. Use your back button and try again. This is returned if the inputted month is not an integer between 01 and 12.
yearCheck Check the expiration date. It appears to be expired. Use your back button and try again. This is returned if the credit card expiration date is past.
swipeDataIn The length of the swiped data is too large. Please check your entry. Use your back button and try again. This is returned if the length of the swiped data is longer than 255 characters.
nameOnCardIn The name on the card is too long. Please check your entry. Use your back button and try again. This is returned if the name on the card is longer than 30 characters.
nameOnCardIn2 Please check the name on the card. Use your back button and try again. This assumes that a name was either omitted or longer than 30 characters.
ccvNumberLength Please check the CCV number. It should be 3 or 4 numbers. This is the security value on the back of the card. Use your back button and try again. This is returned if the inputted CCV number is longer than 4 digits.
streetAddressLength Please check the street address. It is too long. Use your back button and try again. This is returned if the street address was longer than 150 characters.
zipAddressLength Please check the billing zip code. It is too long. Use your back button and try again. This is returned if the zip code is longer than 15 characters.


Samples
Caption Text
JSON
{"API_CALL_FUNCTION_NAME":"validateAndFormatCardData","CC_EXP_DATE":"0820","API_USER_PASSWORD":1234,"ACTUAL_SWIPE_DATA":12345,"API_URL_ENCODING":"AUTO","API_INPUT_OUTPUT_TYPE":"JSON","API_CURRENT_PAYEE_ID":3,"API_USER_NAME":"demo","CC_THREE_DIGIT":355,"API_CORP_KEY_ID":"PLA-0053","AMOUNT":120,"NAME_ON_CARD":"Donald Duck","CC_NUMBER":4777777777777777,"ZIP_ADDRESS":55555,"STREET_ADDRESS":"123 Main"}