Jump to content
Sign in to follow this  
bmcewan

[Contribution] CC_CVV_start date plus credit card blacklist

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

Share this post


Link to post
Share on other sites
But anyway, How can I stop the client continuing if spaces are entered?

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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. :)

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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;

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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


"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
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.

Share this post


Link to post
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)


"Know that this is your God, who could not consent to send anyone else to save you, but would come himself that he might gain for himself all your love." St Alphonsus Ligouri

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×