Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Credit card validation in a webapp

 
Alec Swan
Ranch Hand
Posts: 39
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Apache Commons Validator API has a CreditCardValidator class you could use.
 
Paul Clapham
Sheriff
Posts: 21306
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21306
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. Then to reword my post, you should follow the instructions provided by those services.
 
Alec Swan
Ranch Hand
Posts: 39
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect answer. This was exactly what I was looking for!
Thanks Shawn.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic