iceman2g Posted February 27, 2005 Share Posted February 27, 2005 I'm testing oscommerce on a local server and notice I can only checkout using the credit card feature, if I enter my real credit card number and expiration date. Is there a reason for this? Also how is it able to verify my credit card is real, if i'm not using a third party processor. Quote Link to comment Share on other sites More sharing options...
OceanRanch Posted February 27, 2005 Share Posted February 27, 2005 The standard cc.php credit card module does a sanity check (checks the first x numbers) of the card to make sure its a valid card type and also performs a standard "calculation" on all of the digits to verify that it is a "valid" number. The check is only numeric and does not mean that the card is "valid". Only when you run it by your credit card payment provider will it determine if it is a real/valid CC. HTH Tom Quote Link to comment Share on other sites More sharing options...
iceman2g Posted February 27, 2005 Author Share Posted February 27, 2005 I entered my credit card number and only altered the last digit and it told me it wasn't valid. Quote Link to comment Share on other sites More sharing options...
OceanRanch Posted February 27, 2005 Share Posted February 27, 2005 Altering the last digit will probably result in an invalid credit card number. As I said there is an algorithm that is used to validate a correct number (not a real credit card). Tom Quote Link to comment Share on other sites More sharing options...
babylea Posted February 27, 2005 Share Posted February 27, 2005 apologies for jumping in on this post but is it right that you need to have a 3rd party processor for the actual transaction and cannot run the cc.php module alone for payments? Quote Link to comment Share on other sites More sharing options...
OceanRanch Posted February 27, 2005 Share Posted February 27, 2005 The standard cc.php does not interface to any payment processor outside of your site. It only checks the numbers on the CC for "sanity". Tom Quote Link to comment Share on other sites More sharing options...
babylea Posted February 27, 2005 Share Posted February 27, 2005 thanks for verifying tom Quote Link to comment Share on other sites More sharing options...
TerryK Posted February 27, 2005 Share Posted February 27, 2005 James, I found with the standard cc_validation.php file that MANY credit cards were being rejected -- including my own valid MasterCard! Since I process all of my orders manually, I changed the file so that it only looked for the first number to determine if it's a Visa or MasterCard (the only cards I accept), and leaves the rest of the validation to me. Here's the code I used in cc_validation.php: class cc_validation { var $cc_type, $cc_number, $cc_expiry_month, $cc_expiry_year; function validate($number, $expiry_m, $expiry_y) { $this->cc_number = ereg_replace('[^0-9]', '', $number); if (ereg('^4[0-9]{15}$', $this->cc_number)) { $this->cc_type = 'Visa'; } elseif (ereg('^5[0-9]{15}$', $this->cc_number)) { $this->cc_type = 'MasterCard'; } elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) { /* Not accepting these cards $this->cc_type = 'American Express'; } elseif (ereg('^3(0[0-5]|[68][0-9])[0-9]{11}$', $this->cc_number)) { $this->cc_type = 'Diners Club'; } elseif (ereg('^6011[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Discover'; } elseif (ereg('^(3[0-9]{4}|2131|1800)[0-9]{11}$', $this->cc_number)) { $this->cc_type = 'JCB'; } elseif (ereg('^5610[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Australian BankCard'; */ } else { return -1; } HTH, Terry Quote Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. * Link to comment Share on other sites More sharing options...
TerryK Posted February 27, 2005 Share Posted February 27, 2005 Also, there is a test credit card number set up by default (I believe). On mine, it's: 4111 1111 1111 1111 HTH, Terry Quote Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. * Link to comment Share on other sites More sharing options...
ozEworks Posted February 28, 2005 Share Posted February 28, 2005 On this subject one of my clients does not want to process credit cards online. I was looking at the cc.php thinking to modify it and I started to wonder how you could ask them to enter these details here anyway as it does not seem to use SSL. So would it not be really risky to install that program? On another note I decide to make a copy of the cod.php files and call it manualcredit.php. That way they just select it from the list of payment options and nothing more. The files are in the right places but this option just does not display under Admin to install it. Does anyone know what I can have done wrong to cause this? Quote Link to comment Share on other sites More sharing options...
TerryK Posted February 28, 2005 Share Posted February 28, 2005 Hi Kym, Yes, I think you'd be taking a BIG risk by using cc.php as is. While you can split the credit card number so that half is kept in the database and the other half gets Emailed to you, I don't think that's really a good solution. So in my case, the folks I host with used a GPG encryption mod that they found in the contrib section and modified it to suit my needs so that the credit card info for orders now comes to me encrypted and I use my PGP key to decrypt it. MUCH better! As for your question about duplicating the payment method, I did that to create a 'Call with Credit Card' payment option on my site. I think I started with the moneyorder.php file and modified it to suit my needs. HTH, Terry Quote Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. * Link to comment Share on other sites More sharing options...
ozEworks Posted February 28, 2005 Share Posted February 28, 2005 (edited) Hi Terry There you are being wonderfully helpful to me again. We changed the cod file instead of the money order one. Trouble is it just does not show up under Admin Payments to install it. I have the file in the Admin/Payment/Module directory with all the others so I can't work out why? Got any clues? PS: Is it just me or did this board format change? I used to see all posts unter a topic and now I only see one and the rest as links? Edited February 28, 2005 by FlyingKites Quote Link to comment Share on other sites More sharing options...
TerryK Posted February 28, 2005 Share Posted February 28, 2005 (edited) Did you create a language file to go with the duplicated module? Did you remember to change all of the info inside the file to reflect what you were calling it? i.e. do a 'match case' search for every instance of 'cod' and replace with manualcredit, then do a second 'match case' search for COD and replace with MANUALCREDIT, in both the /catalog/includes/modules/payment file as well as in the /catalog/includes/languages/english/modules/payment file. HTH, Terry PS: My view of the forum pages hasn't changed -- did you accidentally click one of the view links near the top of the page? (Linear, Standard, etc.) Edited February 28, 2005 by TerryK Quote Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. * Link to comment Share on other sites More sharing options...
ozEworks Posted March 1, 2005 Share Posted March 1, 2005 I thought I stuffed up the forum myself. I am so tired I don't know what I am doing. Hey, I looked at your site. It is very cute. How are things going? I have both files so maybe it is something iI have not changed in the copied program. I will go check it again. You are an angel. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2005 Share Posted March 16, 2005 Hi, sorry to intrude on your thread here but I've been searching for days for a solution to my problem. Basically I'm setting up an online shop (using oscommerce obviously) for an independant record store here in the UK and the shops owner wants to be able to process credit card details offline in the shop as it has a few distinct advantages for her. Now I see you have managed to solve this problem using encrypted e-mails, this is exactly what we want to be able to do. Is there any chance you could guide me through what we would have to do to set this up? Thanks, Jon Quote Link to comment Share on other sites More sharing options...
TerryK Posted March 16, 2005 Share Posted March 16, 2005 Hi Jon, I wish I could help you, but I didn't make the actual changes -- my tech support did. I know they started with the GPG module in the Contributions section, but they also had to make some changes to it (and I'm not sure why or what). If I can find out, I'll pass along the info. In the meantime, you might want to check out GPG and see how it works... Terry Quote Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. * Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2005 Share Posted March 16, 2005 Thanks anyway, I'm not sure if I can figure it out but I'll give it a go! If anyone else has any suggestions I'd be most gratefull. Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2005 Share Posted March 18, 2005 Hi again, now I've come upon a problem with the cc_validation.php file, I've added the contribution to get it working for UK cards but its still rejecting a few cards, does anyone know a way to get it to bypass the validation process? I mean it isnt neccesary as the shop owner can find out if theyre valid in store obviously... Any help? Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.