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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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"}
|