This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
A Google search for "java credit card validation" will bring up plenty of example on how to validate the card number. If you want to perform the actual authorisation, check the developer information from your clearance house.
If u are using struts u have to incorporate the "Validation Framwork" which does ur work simpler... Which in turn usessthe java script buti wont be visible to client as everthing is taken care by prgramer in java classes