Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CC Payments...


SignArt

Recommended Posts

Hi,

I am trying to set up an osc site to accept all types of cards, our customer wants to be able to input the card details into their offline card machine.

The problem is the built in osc module only seems to accept MasterCards... Can anyone offer me any help/advice?

We have all the SSL etc.. set up already.

 

Thanks,

Harry

Link to comment
Share on other sites

Hi,

I am trying to set up an osc site to accept all types of cards, our customer wants to be able to input the card details into their offline card machine.

The problem is the built in osc module only seems to accept MasterCards... Can anyone offer me any help/advice?

We have all the SSL etc.. set up already.

 

Thanks,

Harry

Look in the contributions (add ins) area. There are many payment modules that can be installed, including Telephone Payment, etc.

Link to comment
Share on other sites

the stock cc.php should accept all cards, maybe you are using something different?

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

  • 2 weeks later...

I have added a will call with CC details, but it is inconvenient for customers to do that really. I would prefer them to be able to do everything easily.

I am using the stock cc.php, but its not working.. It just comes back with this message...

"The first four digits of the number entered are: ****<br>If that number is correct, we do not accept that type of credit card.<br>If it is wrong, please try again."

 

Any help would be greatly appreciated.

 

Thanks,

Harry

Link to comment
Share on other sites

Check your \includes\classes\cc_validation.php file

 

Specifically, function validate(), which should appear near the top. In the example below, VISA and MASTERCARD are valid. All others (AMEX, DISCOVER, JCB, DINERS CLUB, and AUSTRALIAN BANKCARD) have been commented out, returns error code -1, and generates the 'If that number is correct, we do not accept that type of credit card' message (found in includes\languages\english.php TEXT_CCVAL_ERROR_UNKNOWN_CARD)

 

This function confirms that the provided card number follows the account numbering schema used by the various issuers, and if valid, further tests for validity of the provided expiration date

 

    function validate($number, $expiry_m, $expiry_y) {
     $this->cc_number = ereg_replace('[^0-9]', '', $number);

     if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) {
       $this->cc_type = 'Visa';
     } elseif (ereg('^5[1-5][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;
     }

     if (is_numeric($expiry_m) && ($expiry_m > 0) && ($expiry_m < 13)) {
       $this->cc_expiry_month = $expiry_m;
     } else {
       return -2;
     }

     $current_year = date('Y');
     $expiry_y = substr($current_year, 0, 2) . $expiry_y;
     if (is_numeric($expiry_y) && ($expiry_y >= $current_year) && ($expiry_y <= ($current_year + 10))) {
       $this->cc_expiry_year = $expiry_y;
     } else {
       return -3;
     }

     if ($expiry_y == $current_year) {
       if ($expiry_m < date('n')) {
         return -4;
       }
     }

     return $this->is_valid();
   }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...