silicon39 has asked for the wisdom of the Perl Monks concerning the following question:

Are there any credit card validation companies out there who will accept a credit card # via Perl call, and return a VALID or INVALID response? I would like to validate credit cards on-the-fly with as little expense as possible :-) If there are any 3rd party companies who charge per transaction/validation rather than set monthly fees, that would be great. Actually, if anyone has any better ideas, this would also be helpful. Anyone have any ideas on this?

Replies are listed 'Best First'.
Re: Credit Card Validation in Perl
by runrig (Abbot) on Dec 02, 2000 at 00:24 UTC
    There's credit card validation/charging services that have perl libraries, e.g, CyberSource, CyberCash. If you just want to validate credit card checksums there's Business::CreditCard, which is a good idea to do first anyway before you go through the time and trouble of calling the validation routines of the other services.
Re: Credit Card Validation in Perl
by dws (Chancellor) on Dec 02, 2000 at 00:35 UTC
    To do credit card number validation in a JavaScript-enabled browser, check here for an implementation of the (well-known) algorithm. If you don't go that route, it's still a readable implementation to review.
Re: Credit Card Validation in Perl
by turnstep (Parson) on Dec 02, 2000 at 03:32 UTC

    Most third party CC companies do not use a "Perl call" per se, but a simple http (or https) transaction. In other words, a form. You can certainly use LWP and the like to run it yourself. A word of warning: some companies are very browser based, and will return a page directed at the user (e.g. "Hey you forgot your zip code!") instead of a simple valid/invalid code. Shop around, too - prices vary greatly. Most have minor monthly fees (or the low-activity fee- watch out!) as well as the per transaction fee. Figure out your expected transactions per month, and do a lot of shopping around. Your best bet is one without bells and whistles due to the nature of your app (I am assuming that all you need is a simple back-end and you will be doing all the front-end work of gathering the cc#'s and other info)

Re: Credit Card Validation in Perl
by $code or die (Deacon) on Dec 03, 2000 at 23:43 UTC
    Sure.

    You can use SecureTrading

    They have some perl modules for Unix, and I wrote a quick script hack for Win32 Perl which is in the Code Catcombs. I don't actually know what they charge, but I set it up for someone else and it's pretty easy.
      thanks $code or die - if anyone else has recommendations of other vendors (specifically UK ones) offerring Perl libraries, this would be appreciated.

      Also if anyone has experience of problems with reliability, security, etc (or buggy Perl libraries for that matter) then this would be great to know in advance.

      Cheers,
      andy.