GeeCON Prague 2014*
The moose likes Java in General and the fly likes Credit card validation in a webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Credit card validation in a webapp" Watch "Credit card validation in a webapp" New topic
Author

Credit card validation in a webapp

Alec Swan
Ranch Hand

Joined: Feb 03, 2005
Posts: 39

I am starting a new project and considering using Grails or J2EE as the implementation platform. The project is a small-scale web application which will need to validate credit card information entered by the user.

Could anybody recommend or explain how credit card validation can be done in a web application?

Thanks.

Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

The Apache Commons Validator API has a CreditCardValidator class you could use.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

But beyond the basic validations such as checking the credit card number's check digit, you will need to follow the instructions provided by the banker who does the actual payment processing on your behalf.
Alec Swan
Ranch Hand

Joined: Feb 03, 2005
Posts: 39

My original post was a little vague.

What I was looking for is feedback on integrating with PayPal, Google Checkout or other online credit card processing services.

Thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Ah. Then to reword my post, you should follow the instructions provided by those services.
Alec Swan
Ranch Hand

Joined: Feb 03, 2005
Posts: 39

I was hoping that you could recommend one or the other or some other credit card processing service provider.
I am sure some providers are easier to integrate and some are more reliable. This kind of evaluation is what I was looking for.
Shawn Montague
Greenhorn

Joined: Aug 06, 2008
Posts: 25
It really depends on what sort of payment validation you're looking for and what you want to spend. PayProFlow and Auth.NET are expensive but offer better fraud protection and authorization tools. PayPal and Google have lighter weight SDKs but not as many bells and whistles.

I've worked with all of them except Google and they all have their pros and cons. I would take Auth.NET over PayProFlow because their SDK is easier to use. I would probably use Google over PayPal just because I don't like PayPal

If you want to go cheap, then go PayPal or Google. Check their feature sets to make sure they have what you want then check their APIs and see which one looks easiest to implement. If the feature sets look comparable, I'd go with ease-of-implementation since they are both big names and probably both just as secure.

Up front, I would only worry about doing MOD10 checks on the cards and let the payment provider do the rest (that's what they're there for)...trying to determine if a card is a certain type is a pain because there are so many variants (especially once you get outside the States).
Alec Swan
Ranch Hand

Joined: Feb 03, 2005
Posts: 39

Perfect answer. This was exactly what I was looking for!
Thanks Shawn.
 
GeeCON Prague 2014
 
subject: Credit card validation in a webapp