Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Card Error


livingplanet

Recommended Posts

I've had my store online and working for the past year.

I've been using the included Credit Card Module with osCommerce 2.2-MS2.

Just this past week I've been getting a credit card error, below:

 

"The credit card number entered is invalid.<br>Please check the number and try again."

 

even when the numbers are right.

 

Has anyone ever had this problem? and how do you fix it?

 

Thanks,

Mark

Link to comment
Share on other sites

I have not made any changes.

 

I found this in the forum.

 

http://www.oscommerce.com/forums/index.php?showtopic=200146

 

 

I tried adding this line of code

 

return 1;

 

underneath this line of code

function validate($number, $expiry_m, $expiry_y) {

 

as suggested in that thread in my catalog\includes\classes\cc_validation.php file

 

 

but then I get this error:

 

Warning: str_repeat(): Second argument has to be greater than or equal to 0. in /www/home/livingplanet.ca/htdocs/shop/catalog/includes/modules/payment/cc.php on line 137

 

 

I open up cc.php and look to line 137 (below):

   'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),

 

 

Anyone have any ideas?

Edited by livingplanet
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...