Telerik blogs

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.


View Ultimate .NET Credit Card Utility Class article

About the Author

Todd Anglin

Todd Anglin is Vice President of Product at Progress. Todd is responsible for leading the teams at Progress focused on NativeScript, a modern cross-platform solution for building native mobile apps with JavaScript. Todd is an author and frequent speaker on web and mobile app development. Follow Todd @toddanglin for his latest writings and industry insights.

Related Posts


Comments are disabled in preview mode.