Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] CC_CVV_start date plus credit card blacklist


Guest

Recommended Posts

I'd like to ask the php'ers a relatively basic question.

 

I've added this contribution however I notice that it rejects the C/C if spaces are entered in the numbers.

 

This is a bit of a problem because spaces are very helpful in the read out later.

 

But anyway, How can I stop the client continuing if spaces are entered?

 

or

 

How do we make this contribution program accept spaces?

 

Sorry that ended up being to questions (2 in 1 anyway). :)

Link to comment
Share on other sites

  • Replies 311
  • Created
  • Last Reply

Top Posters In This Topic

I am not quite sure you guy have come across anything like this yet:

 

Switch Card with no Issue Number

 

but the contribution will definately ask for a issue number otherwise, will not allow to checkout, but when i type in ISSUE NO. with "1" and it allows to check out, Can this contribution that detects the Switch Card got no issue number on it? Cheers.

 

 

 

Micky

Link to comment
Share on other sites

P.S. To the above.

 

But anyway, How can I stop the client continuing if spaces are entered or how do I strip the spaces automatically?

 

Why not increase the number of characters that the field accepts. I encountered this problem and changed cc_number in the orders table to varchar(32). Now accepts full Switch numbers with spaces. As ever, backup first. Not my fault if it goes wrong etc. :)

Link to comment
Share on other sites

Why not increase the number of characters that the field accepts.  I encountered this problem and changed cc_number in the orders table to varchar(32).  Now accepts full Switch numbers with spaces.  As ever, backup first.  Not my fault if it goes wrong etc. :)

Iain

Currently my cc_number is set to 64.

Your saying to decrease this size to 32 and this is all you needed to do to fix it for you.

Is this correct?

Link to comment
Share on other sites

Iain

Currently my cc_number is set to 64.

Your saying to decrease this size to 32 and this is all you needed to do to fix it for you.

Is this correct?

 

No, that beats me I'm afraid. I increased mine from memory to 32 and set the type to varchar()

 

sorry, looks like this isn't the solution for your issue. Post back if you make progress

Link to comment
Share on other sites

No, that beats me I'm afraid.  I increased mine from memory to 32 and set the type to varchar()

 

sorry, looks like this isn't the solution for your issue.  Post back if you make progress

Iain

 

I just checked again what my problem actually is and it's actually that the validation won't let me enter spaces.

For example, even though entering all valid C/C details it comes back with this message:

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

I don't know how to adjust this in the cc_validation.php file.

You must have a different validation file, perhaps.

How long ago did you download and install yours or your version?

Mine is: cc_cvv+encryption v1.7.

Link to comment
Share on other sites

Iain

 

I just checked again what my problem actually is and it's actually that the validation won't let me enter spaces.

For example, even though entering all valid C/C details it comes back with this message:

 

I don't know how to adjust this in the cc_validation.php file.

You must have a different validation file, perhaps.

How long ago did you download and install yours or your version?

Mine is: cc_cvv+encryption v1.7.

 

Sorry, Didn't check the version

 

but I don't use the validation anyway. I have it disabled in admin becasue of it incorrectly indentifying certain Mastercard numbers.

Link to comment
Share on other sites

Sorry, Didn't check the version

 

but I don't use the validation anyway. I have it disabled in admin becasue of it incorrectly indentifying certain Mastercard numbers.

 

I've just tried turning off the validation and found that it still will not accept spaces.

This is in the cc.php file.

I've had a look at this file and if I remove this validation, it almost also makes the whole functionality of the contribution a waist of time.

So I will for the moment just grin and bear it and deal with any problems if they crop up and/or hope and wait to see if someone can modify the script accordingly.

 

Thanks anyway Iain

 

Cheers

John

Link to comment
Share on other sites

I've just tried turning off the validation and found that it still will not accept spaces.

This is in the cc.php file.

I've had a look at this file and if I remove this validation, it almost also makes the whole functionality of the contribution a waist of time.

 

 

OK, but be aware that the reason I disabled the validation element is that the validation was losing me sales by incorrectly identifying valid Mastercards as another card type that I do not take. the only reason I found this out was that customers were mailing to say they were having problems. I might not have found out otherwise.

 

If anyone knows if this issue has been solved btw, pleae post it here. I would like to run the validation again if possible.

 

best of luck John

Link to comment
Share on other sites

If a user enters spaces in their credit card number, the validation routine will fail it.

Here is a simple fix to the problem for everyone who asked in the forum.

 

Open include/classes/cc_validation.php and find this bit:

 

    function validate($number, $expiry_m, $expiry_y) {
     $this->cc_number = $number;

//  could not get the strip non numerics to work but left the function in and commented out the function call
//	$Number = cc_validation::cleancc($number);	
$Number = $number;

 

we need to uncomment the bit the author couldn't get working, and move one line so basically replace the above with this:

 

   function validate($number, $expiry_m, $expiry_y) {
    $Number = cc_validation::cleancc($number);
    $this->cc_number = $Number;

 

Problem solved!!

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

If a user enters spaces in their credit card number, the validation routine will fail it.

Here is a simple fix to the problem for everyone who asked in the forum.

 

Open include/classes/cc_validation.php and find this bit:

 

 ? ?function validate($number, $expiry_m, $expiry_y) {
? ? ?$this->cc_number = $number;

// ?could not get the strip non numerics to work but left the function in and commented out the function call
//	$Number = cc_validation::cleancc($number);	
$Number = $number;

 

we need to uncomment the bit the author couldn't get working, and move one line so basically replace the above with this:

 

 ? function validate($number, $expiry_m, $expiry_y) {
? ? $Number = cc_validation::cleancc($number);
? ? $this->cc_number = $Number;

 

Problem solved!!

 

sounds really great am trying now, thanks heaps.

Link to comment
Share on other sites

Tom

 

I have tried your suggestion as per above and it did not work for me.

Perhaps there is something else you did but forgot to incuded?

 

The changes did highlight some other errors however.

For some reason there is errors that are popping while trying this out but there has been no define ever included for the errors. Also the define for these errors are in the wrong language file.

Currently I had them at the bottom of the:

catalog/includes/languages/english.php file.

 

This is what was in my english.php file. However it was short at least a couple of error defines also.

define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid. Please check the date and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');

 

This should look at least like this in the: catalog/includes/languages/english/modules/payment/cc.php file.

define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid. Please check the date and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_SHORT', 'Please re-enter your credit card numbers the minimum required is: ' . CC_NUMBER_MIN_LENGTH . ' ');
define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'We apologise but our system did not recognise the card numbers you entered.  Please try again!');

 

There may even be some others but have not struck them yet.

 

Anyway I back to square one with the spaces thing, for the moment.

Any further suggestions much appreciated.

 

This is what I ultimately ended up trying but still no success with removing spaces.

function validate($number, $expiry_m, $expiry_y) {
   $Number = cc_validation::cleancc($number);
   $this->cc_number = $Number;
$Number = $number;

Link to comment
Share on other sites

Tom

 

I have tried your suggestion as per above and it did not work for me.

Perhaps there is something else you did but forgot to incuded?

 

The changes did highlight some other errors however.

For some reason there is errors that are popping while trying this out but there has been no define ever included for the errors. Also the define for these errors are in the wrong language file.

Currently I had them at the bottom of the:

catalog/includes/languages/english.php file.

 

This is what was in my english.php file. However it was short at least a couple of error defines also.

define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid. Please check the date and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');

 

This should look at least like this in the: catalog/includes/languages/english/modules/payment/cc.php file.

define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid. Please check the date and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.');
define('TEXT_CCVAL_ERROR_SHORT', 'Please re-enter your credit card numbers the minimum required is: ' . CC_NUMBER_MIN_LENGTH . ' ');
define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'We apologise but our system did not recognise the card numbers you entered. ?Please try again!');

 

There may even be some others but have not struck them yet.

 

Anyway I back to square one with the spaces thing, for the moment.

Any further suggestions much appreciated.

 

This is what I ultimately ended up trying but still no success with removing spaces.

function validate($number, $expiry_m, $expiry_y) {
? ?$Number = cc_validation::cleancc($number);
? ?$this->cc_number = $Number;
$Number = $number;

 

Yeah, I see where you've gone wrong (I think). Take out the last line $Number = $number; this just undos the cleanup and it was included as part of the bit I said to replace :D

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

Yeah, I see where you've gone wrong (I think). Take out the last line $Number = $number; this just undos the cleanup and it was included as part of the bit I said to replace  :D

 

 

And don't worry about the defines cc.php just adds more - remember BOTH files are included, so if the define isn't found in one, it will be in the other - Tom

OSC Image Magic

On-the-fly thumbnails, watermarks and image processing

Link to comment
Share on other sites

And don't worry about the defines cc.php just adds more - remember BOTH files are included, so if the define isn't found in one, it will be in the other - Tom

 

Tom

I originally as per your post commented out the $Number = $number; line.

I found that I was having trouble entering anything hence then those define errors started to pop up.

So I then put that line back in and it would work but then depending on the way I entered the numbers (with/without spaces) showed another define error (missing)

 

Re where the defines are located. My point was primarily to keep the defines in the relevent file as aposed to somewhere where it would just work.

 

John

Link to comment
Share on other sites

  • 2 weeks later...

Have installed on ms2.2

Have deleteted all rows from orders table

Have removed and reinstalled in admin section several times

 

Still no joy, when I do the install button in admin-payment-credit card I just get the regular features with none of the extras from the contrib.

 

Really appreciate if anyone knows something I'm missing

Thanks,

Ally

Link to comment
Share on other sites

Have installed on ms2.2

Have deleteted all rows from orders table

Have removed and reinstalled in admin section several times

 

Still no joy, when I do the install button in admin-payment-credit card I just get the regular features with none of the extras from the contrib.

 

Really appreciate if anyone knows something I'm missing

Thanks,

Ally

 

If your not seeing all the new credit card features I would suggest that you have either:

1. Actually uploaded the new catalog/includes/modules/payment/cc.php file.

or

2. Not Uninstalled the Credit card module from the Admin section and then reinstalled the cc module after uploading the new cc.php file.

 

hope this helps.

Link to comment
Share on other sites

1. Actually uploaded the new catalog/includes/modules/payment/cc.php file.

 

Doh, I love the simple ones, I hadnt uploaded the cc.php in to the secure part of the catalog,

 

Thanks Gob, wonderfull when its working B)

Link to comment
Share on other sites

  • 3 weeks later...
1.

the newst version is mixed up the CC class check for JCB while using VISA and check for visa when using JCB

1. What all do I need change, and in which files, to get it correct the mix-up between JCB and VISA identification?

 

I've tried figuring it out but I keep getting confused and lost. Otherwise the contribution seems to be working good.

 

Thanks for any help,

Danny

Link to comment
Share on other sites

  • 2 months later...

Hi Guys,

 

I have been fighting with this for days.

 

I have added the SQL code and replaced the files, modified the .php pages to the letter and when i enter a Switch or Solo card I get the following problem:

 

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

 

I tried my visa and it works no problems, just this problem.

 

When I go into the admin/modules/payment section under cards there is no list, however I have only installed 1.0.

 

All I get is:

 

cc.gif

 

Can anyone help me with this?

 

 

Many Thanks

 

Neil

Link to comment
Share on other sites

Hi Guys,

 

I have been fighting with this for days.

 

I have added the SQL code and replaced the files, modified the .php pages to the letter and when i enter a Switch or Solo card I get the following problem:

 

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

 

I tried my visa and it works no problems, just this problem.

 

When I go into the admin/modules/payment section under cards there is no list, however I have only installed 1.0.

 

All I get is:

 

cc.gif

 

Can anyone help me with this?

Many Thanks

 

Neil

 

What you have not done yet (and it is a short coming of the instructions) is Unistall/Remove the existing Module, by clicking the Remove Button (it will work OK) and then once removed, Click the install Button again.

You will then see a whole range of new options.

 

I also found that you need to turn the Enable CC Validation to: OFF/False, otherwise your clients will have trouble/

The Validation does not work correctly.

They must also no longer insert spaces in the C/C number. I suggest putting a note in Red next the C/C # entry accordingly.

These problems almost negate the reason for installing this module but at least you get the encription process and CVV number.

Maybe one day someone will fix the whole script properly. I would if I could but it is beyond my skills.

 

Hope this helps.

Link to comment
Share on other sites

Ok,

 

Tried, and I am 90% the way there:

 

I managed to list all the cards in the admin/ payments... I then successfully placed an order using my Switch card.

 

When I went into the admin section and looked at the orders I got the following:

 

1054 - Unknown column 'products_serial_number' in 'field list'

 

select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_serial_number from orders_products where orders_id = '83'

 

[TEP STOP]

 

I read in this thread that I might need to add "alter table orders_products add column products_serial_number varchar(128); " into my SQL.

 

I promptly added this and then nothing worked! So I guess that?s not right.

 

 

Any more ideas on how to fix this little problem.... Please help... I am almost there!

 

Cheers for now,

 

 

Neil

Link to comment
Share on other sites

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...