Have you ever thought about processing credit cards in your .NET application? If you have, then you know one of the first things you need to do is find some code to validate that credit card numbers entered by your users appear correct before you send them along to your payment processor. Having created applications in the past that process credit cards, I know that this task can be surprisingly harder than it should be. There are plenty of code snippets scattered across the 'Nets that show you how to do individual parts of the validating process, but there are few resources that pull of the code together into simple, easy to use utility class. Until now.
I have written and posted an article on the Code Project that presents the Ultimate .NET Credit Card Utility Class. This utility class, provided in both C# and VB with NUnit tests and a test website, has everything you need to quickly start pre-validating credit card numbers before you initiate a transaction with your payment processor (sometimes referred to as your "Gateway"). Hopefully you'll find this class helpful in your projects and it will save you some time when you're ready to start accepting credit cards. If you have some ideas on how to improve the "ultimate" utility class, leave your ideas in the Code Project article forums and I'll be sure to update the project.
Enjoy! View Ultimate .NET Credit Card Utility Class article
@toddanglin on Twitter
Copyright © 2017, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.