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.
Ping & DNS - updated with new look and Ping home screen widget
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