Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Specifying which credit/debit cards are accepted


m175400

Recommended Posts

I am trying to find the file in which I specify which credit/debit cards are accepted on the site. As you probably know, an example of such a variable is MODULE_PAYMENT_CC_ACCEPT_DELTA.

 

Can anybody tell me where I can find this configuration file please?

 

Many thanks.

Link to comment
Share on other sites

I am not sure what you mean... do you want to be able to tell customers which cards you accept or are you looking for something in the admin area to tell the cart you only accept certain types? (I think the latter is done via whoever your merchant account is with)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Hi Wendy! You've been such a great help to me! :o)

 

We process orders manually by hand here on our terminals. The store is rejecting orders when people enter certain credit card numbers e.g. for Delta cards. In my cc_validation.php file it refers to a variable set somewhere or other called MODULE_PAYMENT_CC_ACCEPT_DELTA which is presumably set to false somewhere, as it says if the card number equals x then y = false and if y = false then tell the user we don't accept the card.

 

So yes, I am looking for either an option in the admin area to setup which cards are accepted or a variable in the site code itself where this variable is set. I can't find one in the code but I only have ftp access via the poxy filemanager in the admin area, so perhaps I haven't downloaded the offending file.

 

Thanks for your help!

Link to comment
Share on other sites

Now I feel bad as I have no answer for you. lol

I am not great with php or how to call info from the database but I am pretty sure someone will come along that has the answer. I am going to see if I can find something... which module are you using for accepting credit cards?

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

The Credit Card (CC) module. For the time being I have overriden the settings manually in the cc_validation.php file, but it's hardly the ideal solution.

 

If by doing a search ony our entire sites code for MODULE_PAYMENT_CC_ACCEPT_DELTA or MODULE_PAYMENT_CC_ACCEPT_ELECTROn you manage to find the file in question then u are my saviour!

 

Thanks Wendy, you're g g g greeeeat :o) lol

Link to comment
Share on other sites

Looking at the cc_validation.php in the classes folder it looks like you would need to add a line for whichever card is being denied or alter a line if it is already listed.

 

something like

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

$this->cc_type = ' Delta Card';

 

but I do not know how a delta card works or what the numbers are like.

Maybe by compairing the numbers off of a Delta card and compairing it to what is already on that file you (or someone here if you post the info) could figure it out.

 

I could be completely off since I am just guessing but this is the only idea i can come up with.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

if ( ((($NumberLeft6 >= 413733) && ($NumberLeft6 <= 413737))

|| (($NumberLeft6 >= 446200) && ($NumberLeft6 <= 446299))

|| (($NumberLeft6 >= 453978) && ($NumberLeft6 <= 453979))

|| ($NumberLeft6 == 454313)

|| (($NumberLeft6 >= 454432) && ($NumberLeft6 <= 454435))

|| ($NumberLeft6 == 454742)

|| (($NumberLeft6 >= 456725) && ($NumberLeft6 <= 456745))

|| (($NumberLeft6 >= 465830) && ($NumberLeft6 <= 465879))

|| (($NumberLeft6 >= 465901) && ($NumberLeft6 <= 465950))

|| (($NumberLeft6 >= 490960) && ($NumberLeft6 <= 490979))

|| (($NumberLeft6 >= 492181) && ($NumberLeft6 <= 492182))

|| ($NumberLeft6 == 498824)

) && (ereg('[0-9]{16}', $this->cc_number)) ) {

$this->cc_type = 'Delta';

if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_DELTA) != 'true' ) return -5;

//--

} elseif (( ($NumberLeft6 == 450875)

|| (($NumberLeft6 >= 484406) && ($NumberLeft6 <= 484455))

|| (($NumberLeft6 >= 491730) && ($NumberLeft6 <= 491759))

|| ($NumberLeft6 == 491880)

) && (ereg('[0-9]{16}', $this->cc_number)) ) {

$this->cc_type = "UK Electron";

if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_ELECTRON) != 'true' ) return -5;

//--

}

 

 

 

 

:o)

 

Seems the previously developer already did this so he perhaps added these new MODULE_PAYMENT_CC_ACCEPT_DELTA and MODULE_PAYMENT_CC_ACCEPT_ELECTRON variables to some bespoke file. Hmmm.

 

Thank you!

 

U in the uk Wendy?

Link to comment
Share on other sites

There is no other file or setting. Everything is run right off that cc_validation.php (as far as I can tell) the MODULE_PAYMENT_CC_ACCEPT_DELTA variables are all on this one file and then the page checks here when people enter their cc info.

 

Is there any way to find out what the cc# was for the cards that were rejected? Don't post it here! lol... dont want to get in trouble. Just thinking that the numbers need to be compaired to the code to see what could be wrong.

 

Nope, I'm not. I am in the US but I have made sites for people in the UK =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

No unfrotunately because it doesn't get as far as to save the cc number because it treats it as invalid.

 

I'm not sure where the setting is come from then, it must be down to the bespoke changes they've made.

 

U build a lot of osCommerce stores? Are u a fan of it overall?

 

Thanks again :)

Link to comment
Share on other sites

The settings are in that piece of code you posted, that is why if you know what the cc# is it could probably be fixed... if going by my theory is right. As I said I don't know as much about this part of php and database stuff as I wish I did.

 

I have done quite a few on my own and am doing freelance type stuff with several companies who have added asc shopping cart systems to what they offer their clients. Adding mods and doing the layout/changing the look type stuff. They usually handle the problems like you are having and that works fine with me. LOL

 

I love osc and never ever recommend any other system when people ask me about shopping carts. I have used many different types and this is the best one overall I think.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I don't think the actual settings i.e. setting the value of MODULE_PAYMENT_CC_ACCEPT_DELTA = 'true' is in that code snippet?

 

That snippet is checking to see if that value is equal to 'true', but it's not setting the value. I have set them manually at the top of the file now though:

 

define('MODULE_PAYMENT_CC_ACCEPT_DELTA','true');

define('MODULE_PAYMENT_CC_ACCEPT_ELECTRON','true');

 

Glad to hear you like it. I am coming around to it, but having never done a fresh install of my own messing with what others have left behind isn't quite so enjoyable so far :o)

Link to comment
Share on other sites

Ahhh I hadn't even thought of that. I thought it was checking the #s and rejecting it because they do not fall under one of the values that was set up.

 

Heck, its hard enough to go back and fix your own stuff never mind working on something someone else has done.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...