What is ZXValidator 2.0?
ZXValidator is a .NET library providing functionality for credit card numbers validation. It allows you also to get the credit card type from a given number and provides information (in text format) what was the error during the validation (if there was any) i, which you could display directly to the users. The new version 2.0 is the successor of the famous version 1, In this new version you could find utilities for bulk credit card numbers validation (there is a special new class called BulkValidator which is useful for doing this. Currently the following credit card types are supported: Visa, MasterCard, Diners Club, American Express, JCB, Discover/Novus, Carte Blanche, Australian BankCard What do I get with the ZXValidator distribution package? You get the ZXValidator library and a set of 3 useful examples which show you how to use the solution. In fact these are 3 solutions (a standalone application , a web service and a web application) which represent basic examples how ZXValidator could be integrated in various types of .NET software solutions. How much does it cost ZXValidator 2.0 and how could I obtain the solution? The price of ZXValidator is $19. We accept online payments by credit cards. In order to purchase ZXValidator, please click on the BUY NOW icon at the top right corner and fill the simple form which will show up. For other kind of payments, please contact us. You'll receive by email the download links to the distribution package of ZXValidator (including the ZXValidator library and the example applications presented on this page) as soon as your payment is completed and verified. (please be aware that sometimes even if your payment is completed it might take up to 24h that it's finally verified). If you are interested you may profit from our special offer now - to get a FREE COPY of ZXValidator if you purchase a copy of WebSiteAdmin, the ultimate content management system. How can I use the solution? There are two main classes in the ZXValidator you may use for credit card numbers validation - SimpleValidator and BulkValidator. ZXValidator.SimpleValidator Example of usage of the SimpleValidator class: /// Creation of the SimpleValidator object /// which will be used to check if the provided /// credit card number is valid ZXValidator.SimpleValidator oSimpleValidator = new ZXValidator.SimpleValidator(); /// Set the credit card number to be validated oSimpleValidator.CreditCardNumber = TextBoxCCNumber.Text; /// Retrieve the credit card validation results string validationResult = "Valid: " + oSimpleValidator.Valid +"Type: " + oSimpleValidator.Type +"Error: " + oSimpleValidator.Error ; ZXValidator.Bulkvalidator Before presenting the BulkValidator class we need to introduce the ZXValidator.CreditCard object. The ZXValidator.CreditCard is a simple object which has the following public properties: string Number - the credit card number bool Valid - after performing the validation, contains TRUE if the credit card number is Valid and FALSE if the provided number is not valid string ValidationError - the validation error (if there was any) string Type - the type of the credit card (for example Visa or Mastercard) The BulkValidator has one main static method called Validate which may be called with an ArrayList of CreditCard objects or with a single CreditCard object. /// Example of usage of BulkValidator ArrayList arrCreditCardNumbers = new ArrayList(); arrCreditCardNumbers.Add(new ZXValidator.CreditCard("2341234123")); arrCreditCardNumbers.Add(new ZXValidator.CreditCard("2342234123")); //Performs the credit card numbers validation ZXValidator.BulkValidator.Validate(ref arrCreditCardNumbers); //Now you can loop through the CreditCard objects //and check the properties of the CreditCard's foreach(ZXValidator.CreditCard in arrCreditCardNumbers) { /// Retrieve information from the validation tests ... ZXValidator.CreditCard.Type ZXValidator.CreditCard.Valid ZXValidator.CreditCard.Errors .. } |
|
I would like to learn more about the three applications included in the distribution package? The first application is a very simple .NET web application with a single page where the user could enter a credit card number and then by pressing the Validate button near it to see the validation result. The method invoked when the Validate button is clicked is given below: This produces the following output: The second example included is a simple Web Service which contains two basic methods (you may see their code below) The third example is more complex and represents a .NET standalone application and uses the BulkValidator object and the functionality it provides. In general when the user enters multiple credit card numbers (one number per line) and then click on the Validate button, the validation results are shown to the treeview to the right. |