Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

site live yet wont take a credit card


wiggy

Recommended Posts

Posted

hi, please help if you can, we cant get a order thru, it says

 

Credit Card Error!

 

The credit card type you've chosen does not match the credit card number entered. Please check the number and credit card type and try again.

 

 

 

 

now we enter a visa and correct visa #, or a mastercard, and from different locations...any ideas? thank you :blink:

Posted

The default Credit Card module that comes with osCommerce is over two years old, and does not include many of the new issue numbers available for different credit cards.

 

If you search through Contributions you should find some which address this problem.

 

Vger

Posted

hi

sorry that cant help, as we are using authorize.net module, not default cc module

 

any other ideas? thanks

 

 

The default Credit Card module that comes with osCommerce is over two years old, and does not include many of the new issue numbers available for different credit cards.

 

If you search through Contributions you should find some which address this problem.

 

Vger

Posted
hi

sorry that cant help, as we are using authorize.net module, not default cc module

 

any other ideas? thanks

I know very little about Authorize.net but the CC Validation is a file in its own right. Maybe Authorize.net uses it?

 

catalog/includes/classes/cc_validation.php

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

hi

sorry, that does not help=anyone else?

thank you

 

I know very little about Authorize.net but the CC Validation is a file in its own right. Maybe Authorize.net uses it?

 

catalog/includes/classes/cc_validation.php

Posted

anyone have any ideas? please help...! thanks

 

hi

sorry, that does not help=anyone else?

thank you

Posted
anyone have any ideas? please help...! thanks

We found the problem:

 

the credit card names in these two files must be spelled exactly the same :)

 

--/catalog/includes/languages/english/modules/payment/authorizenet.php:

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_AMEX', 'Amex');

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_DISCOVER', 'Discover');

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_MASTERCARD', 'Mastercard');

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_VISA', 'Visa');

 

 

--/catalog/includes/classes/cc_validation.php:

 

if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) {

$this->cc_type = 'Visa';

} elseif (ereg('^5[0-9][0-9]{14}$', $this->cc_number)) {

$this->cc_type = 'Master Card';

} elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) {

$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;

}

 

 

In order to avoid getting this error thrown by cc_validation.php:

define('TEXT_CCVAL_ERROR_CARD_TYPE_MISMATCH', 'The credit card type you\'ve chosen does not match the credit card number entered. Please check the number and credit card type and try again.');

 

 

In this example, the error occurs for Master Card and American Express, but not for Visa or Discover.

Posted
We found the problem:

 

the credit card names in these two files must be spelled exactly the same :)

 

--/catalog/includes/languages/english/modules/payment/authorizenet.php:

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_AMEX', 'Amex');

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_DISCOVER', 'Discover');

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_MASTERCARD', 'Mastercard');

define('MODULE_PAYMENT_AUTHORIZENET_TEXT_VISA', 'Visa');

 

 

--/catalog/includes/classes/cc_validation.php:

 

if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) {

$this->cc_type = 'Visa';

} elseif (ereg('^5[0-9][0-9]{14}$', $this->cc_number)) {

$this->cc_type = 'Master Card';

} elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) {

$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;

}

 

 

In order to avoid getting this error thrown by cc_validation.php:

define('TEXT_CCVAL_ERROR_CARD_TYPE_MISMATCH', 'The credit card type you\'ve chosen does not match the credit card number entered. Please check the number and credit card type and try again.');

 

 

In this example, the error occurs for Master Card and American Express, but not for Visa or Discover.

 

Cool...

 

This one's a keeper, it'll go into my little database of lnks. Which file did you decide to change?

 

MasterCard is the Registered (?) Trade Mark for MasterCard, American Express uses both.

 

Edit: I'm pretty sure that AMEX is the official short name for American Express, I'll check.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...