|
ValidateCreditCard
The ValidateCreditCard function is used to Validate a CreditCard Number by using an algorithm that not only runs a Modulus Check on the card number but also returns the card type by checking the number against a list of valid Bank Identification Numbers (BINs). A formal description of the function can be found in the 'Service Description' section of
or for a sample SOAP request and response
The ValidateAccount method takes 5 parameters
| Parameter |
Parameter Description |
| sCreditCardNumber |
The Credit Card Number |
| sUserName |
The unique Account Name given to you when you register |
| sGUID |
The Globally Unique Identifier(GUID) assigned to you when you register |
| sIPAddress |
IP Address. (Leave this blank) | and can be invoked as follows replacing the 'string' values where appropriate:
A typical Valid response will look something like this:
<?xml version="1.0" encoding="utf-8" ?>
- <Validation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ws.esortcode.com">
<ValidationMessage>VALID</ValidationMessage>
</Validation> |
|
The response returns 4 fields and will have one of the following formats:
| ValidationMessage |
CardType |
IsError |
ErrorMessage |
| VALID |
Card Type |
false |
blank |
| INVALID : "Invalid Reason here" |
blank |
false |
blank |
| blank |
blank |
true |
ERROR : "Error Message here" | The Card Types that can be returned are:
| AMERICANEXPRESS |
|
BANKCARD |
|
DINERSCLUBINTERNATIONAL |
|
DISCOVERCARD |
|
JCB |
|
MAESTRO (Includes Switch and Maestro) |
|
MASTERCARD |
|
SOLODEBIT |
|
VISA |
|
VISADEBIT (Includes Delta) |
|
VISAELECTRON |
|
ENROUTE |
| INVALID (The card has passed the modulus check but is not correct for the type of card) |
| UNKNOWN (The card has passed the modulus check but is none of the card types above) |
|
|