Re: [PHP] Credit Card Validation
Nathan Taylor wrote: My question is pretty obvious, I was wondering what the process for validating a credit cards with both preprocessing by the form to determine the pattern validity and post processing by a bank to > confirm the actual card validity. Well since you asked about the /process/ ... and everyone else replied with "hey, here is some code that does it for you..." I'll be different and explain the process. The process starts off with the consumer hitting submit on a secure form with a credit card number. It would be best if you did some common validating yourself (for example, all Visa numbers start with 4, etc.), and such things as the expiry date isn't before the due date (don't think that hasn't happened before). Once you have taken care of these cursory requirements, you then send the credit card information off to your payment gateway. This would be someone like Paypal, Authorize.net, Paysystems, Worldpay, etc. The API for each gateway is different, but generally it consists of you submitting a POST request to a https:// address. In this POST request, you include the credit card number, the billing address, amount of purchase, the details of your account with the payment processor, and depending on transaction, a few different "types" of transaction codes (authorize, charge, credit, recurring, etc.). The payment gateway then takes the transaction details and verifies the authenticity of the information. It will then return the status of the transaction to you. Generally this is done via some callback URL that you specify in your account with the payment gateway. Some gateways (like Paypal) ... will take the consumer to their webpage and display the status of the transaction. Authorize.net for example has a whole host of return codes that it can return. Everything from "address doesn't match" ... to "stolen card", etc. Your application will have to read these codes and deal with them appropriately. Assuming the transaction was authorized, the funds are transferred from the card issuer's account to either your account with the gateway (as is the case with Paypal), or directly to your account ... minus the transcation fees. Some gateways allow you to subscribe to a flat rate per period, in which you can have unlimited transactions, others charge a percentage of each transaction. That's a rediculously simplified version of the transcation process :) You can download the APIs for the gateways and see what kind of requests and responses your application can expect. Authorize.net's is quite comprehensive (I have it printed out -- gotta love Kinkos). -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Validation
I'll take a look through that and do as much further research as is possible. Thanks. - Original Message - From: Craig Lonsbury To: Nathan Taylor ; php-general Sent: Wednesday, October 08, 2003 4:04 PM Subject: RE: [PHP] Credit Card Validation this is a good explanation of the validation you can do. http://www.beachnet.com/~hstiles/cardtype.html if you are trying to validate client-side you'll need javascript, which is why there may not be anything on phpbuilder i have no idea about the bank side, but post any info you find out back here, it is coming up soon for me =) hth, Craig -Original Message- From: Nathan Taylor [mailto:[EMAIL PROTECTED] Sent: October 8, 2003 2:04 PM To: php-general Subject: [PHP] Credit Card Validation Hey guys (and gals), I am sure this has been asked many times before, but I couldn't seem to find a recent PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it doesn't exist. My question is pretty obvious, I was wondering what the process for validating a credit cards with both preprocessing by the form to determine the pattern validity and post processing by a bank to confirm the actual card validity. Your help would be greatly appreciated. Best Wishes, Nathan Taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Validation
The fact is I just pulled up google and typed in PHP-General Archives and clicked the first thing I came up with. Thanks for the link though. - Original Message - From: Becoming Digital To: php-general Sent: Wednesday, October 08, 2003 4:10 PM Subject: Re: [PHP] Credit Card Validation There are a few classes in the Repository. Check the link below. http://phpclasses.promoxy.com/browse.html/class/19.html Not to discount PHP Builder, but I generally find less useful info there than I do at DevShed.com, DevArticles.com, etc. The structure of the site certainly doesn't make the process any easier. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Nathan Taylor" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Wednesday, 08 October, 2003 16:03 Subject: [PHP] Credit Card Validation Hey guys (and gals), I am sure this has been asked many times before, but I couldn't seem to find a recent PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it doesn't exist. My question is pretty obvious, I was wondering what the process for validating a credit cards with both preprocessing by the form to determine the pattern validity and post processing by a bank to confirm the actual card validity. Your help would be greatly appreciated. Best Wishes, Nathan Taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Validation
There are a few classes in the Repository. Check the link below. http://phpclasses.promoxy.com/browse.html/class/19.html Not to discount PHP Builder, but I generally find less useful info there than I do at DevShed.com, DevArticles.com, etc. The structure of the site certainly doesn't make the process any easier. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Nathan Taylor" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Wednesday, 08 October, 2003 16:03 Subject: [PHP] Credit Card Validation Hey guys (and gals), I am sure this has been asked many times before, but I couldn't seem to find a recent PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it doesn't exist. My question is pretty obvious, I was wondering what the process for validating a credit cards with both preprocessing by the form to determine the pattern validity and post processing by a bank to confirm the actual card validity. Your help would be greatly appreciated. Best Wishes, Nathan Taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Credit Card Validation
this is a good explanation of the validation you can do. http://www.beachnet.com/~hstiles/cardtype.html if you are trying to validate client-side you'll need javascript, which is why there may not be anything on phpbuilder i have no idea about the bank side, but post any info you find out back here, it is coming up soon for me =) hth, Craig -Original Message- From: Nathan Taylor [mailto:[EMAIL PROTECTED] Sent: October 8, 2003 2:04 PM To: php-general Subject: [PHP] Credit Card Validation Hey guys (and gals), I am sure this has been asked many times before, but I couldn't seem to find a recent PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it doesn't exist. My question is pretty obvious, I was wondering what the process for validating a credit cards with both preprocessing by the form to determine the pattern validity and post processing by a bank to confirm the actual card validity. Your help would be greatly appreciated. Best Wishes, Nathan Taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Credit Card Validation
Check Out Credit Card validation routine. Uses MOD 10 to check if credit card number is valid. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=74 Validating Credit Card Numbers Without Bank Involvement http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=333 A set of functions to check the validity of a credit card number. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=458 After discovering some credit card validation routines didn't work - here is one that I found works with all the numbers I have tried so far http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=505 Validation function for LUHNMod10 and variant. Can discriminate credit card numbers of varying lengths. Uses [Double >> Sum-of-Digits] transform. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1463 Credit Card Identification and Validation Class - The credit card class provides methods for cleaning, validating and identifying the type of credit card numbers. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1805 Real-Time Transaction Processing PHP Class. Credit Cards & Checks. Supports system check, address verification, authorization and deposit, deposit, credit, commercial card, electronic check debit, and more. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3107 ECHO-PHP Class Real Time Transaction Processor v1.4.4 for Credit Cards and Checks / ACH http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3190 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 07, 2002 11:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Credit Card Validation I know it's been posted here several times and I've looked through the archives but I just need something very simple for this. I have a form that already takes in user information but now before accepting the information, I'd like to pass the credit card information to a function and return true or false. Is anyone using something like this that is simple? Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Validation
You have be a little clearer. What do you want to return on true? a) the card number appears to be numerically valid b) the card has enough credit left on it to place the order I'll assume A. You need to decide what cards are going to be accepted, and look for a class or set of functions which validate that number as numerically valid, given a certain TYPE of card. Ie, VISA's numeric specs for a valid looking card number, will be different to others. I'm pretty sure I've seen a class on phpclasses.org Justin on 08/09/02 7:03 AM, Jeff Lewis ([EMAIL PROTECTED]) wrote: > I know it's been posted here several times and I've looked through the > archives but I just need something very simple for this. I have a form that > already takes in user information but now before accepting the information, > I'd like to pass the credit card information to a function and return true or > false. > > Is anyone using something like this that is simple? > > Jeff > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Validation
Check out http://www.analysisandsolutions.com/code/ccvs-ph.htm At 05:03 PM 9/7/2002 -0400, Jeff Lewis wrote: >I know it's been posted here several times and I've looked through the >archives but I just need something very simple for this. I have a form >that already takes in user information but now before accepting the >information, I'd like to pass the credit card information to a function >and return true or false. > >Is anyone using something like this that is simple? > >Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Validation With Expiration Date
That is correct. As long as the expiration date is past present it's fine. I used to work for another hosting company who would just "guess" new expiration dates for monthly recurring customers who had not submitted a cancellation request but who's cards had expired. As long as the date was past present they would go through. P.S. Save the flames. It was not my idea to guess new expiration dates ;-) Jim Grill Support Web-1 Hosting http://www.web-1hosting.net - Original Message - From: "Craig Vincent" <[EMAIL PROTECTED]> To: "Laurent Drouet" <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]> Sent: Tuesday, July 30, 2002 3:41 AM Subject: RE: [PHP] Credit Card Validation With Expiration Date > > I'm looking for an algorithm or a free PHP Script which enable me > > to verify > > expiration date with a credit card number. > > > > Does anybody knows this ? > > It doesn't existcredit card number alogrithms do not use the expiry date > in their formulas (at least I'm not aware of any that are). Also there is > no way to actually check if a credit card is valid without using a company > that keeps an online database of active credit cards. The most you can do > is verify that the number provided could potentially be a credit card...and > even then the expiry date has no algorithm attached to it...as long as it is > past the present date there's no way to consider it invalid without > cross-referencing against a database of active cards. > > Sincerely, > > Craig Vincent > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Credit Card Validation With Expiration Date
> I'm looking for an algorithm or a free PHP Script which enable me > to verify > expiration date with a credit card number. > > Does anybody knows this ? It doesn't existcredit card number alogrithms do not use the expiry date in their formulas (at least I'm not aware of any that are). Also there is no way to actually check if a credit card is valid without using a company that keeps an online database of active credit cards. The most you can do is verify that the number provided could potentially be a credit card...and even then the expiry date has no algorithm attached to it...as long as it is past the present date there's no way to consider it invalid without cross-referencing against a database of active cards. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] credit card validation
On Tue, Apr 16, 2002 at 02:41:53AM -0600, jas wrote: > I need to know if there is one place to get information on creating a credit > card validation script based on the users selected payment type (i.e. > mastercard, visa, american express, etc.) I've got the best one out there. Automatically determines the card type from the card number. Accurately checks cards from American Express, Australian BankCard, Carte Blache, Diners Club, Discover/Novus, JCB, MasterCard and Visa. http://www.analysisandsolutions.com/code/ccvs-ph.htm That's the PHP version. It also comes in Perl and Visual Basic flavors. -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php