Correct.  Your first "parsing" of the credit card number could be done 
by the web server, just to check its length and format:  you could use 
strlen() function in PHP to count the digits, to verify it is correct. 
 You could strip the dashes with ereg_replace("-", "", 
$credit_card_number) then count its length.

To actually verify that the card submitted is a number assigned by VISA, 
your system would have to connect via LinkPoint, AuthorizeNet, or a 
service like that.  They do address comparisson, bank assigner id 
comparison, and much much more.  Without a merchant account, your PHP 
could only verify that it "appears" to be a valid credit card number. 
 The only other option is to get your local bank to hook you up with a 
merchant account and transaction equipment, and you could just run the 
cards "by hand".  That option doesnt sound very fun but some folks 
prefer doing biz that way.

I dont know about AuthorizeNet, but LinkPoint has an API written in PHP 
that is supposed to be inexpensive, and easilly integratable into any 
PHP apps.  I heard it was only $125.00..  Not a bad price for a few 
hundred lines of code.  I am in no way affiliated with or trying to 
advertise for these companies.  Hope this helps,  Kris

Jas wrote:

>So there is no way to use some sort of string comparison to check the number
>then?  I would have to have a merchant account?  Sorry for being nieve, just
>never tried to work with credit card numbers etc.
>Jas
>
>"Kristopher Yates" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>  
>
>>You should contact Visa International Service Association to determine
>>what constitues a "valid" credit card number.  Just FYI, a valid format
>>is 16 digits; aaaa-bbbb-cccc-dddd.  I believe VISA normally begins with
>>"41" as the first two digits, however, I am not a Visa Int. agent but I
>>am a client. Ultimately, you would need a merchant account to verify its
>>validity, AFTER you have verified its format for accuracy.  HTH Kris
>>
>>Jas wrote:
>>
>>    
>>
>>>Yeah, I have looked at that class file and I don't want someone elses
>>>example to use, I want to build my own but have no way of knowing what
>>>      
>>>
>makes
>  
>
>>>up a valid visa number etc....
>>>Jas
>>>
>>>"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
>>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>>
>>>
>>>      
>>>
>>>>Try this:
>>>>
>>>>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm
>>>>
>>>>Rick
>>>>
>>>>A sense of humor can help you over look the unattractive, tolerate the
>>>>unpleasant, cope with the unexpected, and smile through the
>>>>        
>>>>
>unbearable. -
>  
>
>>>>Moshe Waldoks
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>From: "Jas" <[EMAIL PROTECTED]>
>>>>>Date: Tue, 23 Jul 2002 12:09:48 -0600
>>>>>To: [EMAIL PROTECTED]
>>>>>Subject: [PHP] Credit card checks?
>>>>>
>>>>>Just wondering if anyone has come across the need to develop a class to
>>>>>
>>>>>
>>>>>          
>>>>>
>>>test
>>>
>>>
>>>      
>>>
>>>>>a string of numbers based on a credit card type.  If you have where
>>>>>
>>>>>
>>>>>          
>>>>>
>>>would I
>>>
>>>
>>>      
>>>
>>>>>be able to get information on what string of numbers is consistent with
>>>>>
>>>>>
>>>>>          
>>>>>
>>>each
>>>
>>>
>>>      
>>>
>>>>>of the different credit cards?  Any help would be appreciated!
>>>>>Jas
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>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

Reply via email to