Jump to content
Sign in to follow this  
bmcewan

[Contribution] CC_CVV_start date plus credit card blacklist

Recommended Posts

Ok I need a bit more help

 

First of all I cannot edit any of the english.php files which I know only makes the text a bit more understandable for the administrator, but If I even open and save those files without making any mods I get a parse error so I will leave those well alone.

 

What text editor are you using? If you use a word processor you may be getting invisibles in the php file when you save it. Can you post the parse error(s) here so we can see?

 

The orders.php returned errors when I followed the readme, I restored the original and it works but fails to display the switch cvv and issue number which I will require to process as customer not present.

 

Which orders.php do you mean? There are 2: one in catalog/admin/includes/languages/english/orders.php and one in catalog/admin/orders.php

 

In the ... english/orders.php one, you have only to insert the defines like this in the middle somewhere and save the file (although, once again, your text editor may be causing you problems if it gives you an error once you've saved it):

 

define('ENTRY_CUSTOMER', 'Customer:');
define('ENTRY_SOLD_TO', 'SOLD TO:');
define('ENTRY_DELIVERY_TO', 'Delivery To:');
define('ENTRY_SHIP_TO', 'DELIVER TO:');
define('ENTRY_SHIPPING_ADDRESS', 'Delivery Address:');
define('ENTRY_BILLING_ADDRESS', 'Invoice Address:');
define('ENTRY_PAYMENT_METHOD', 'Payment Method:');
define('ENTRY_CREDIT_CARD_TYPE', 'Credit Card Type:');
define('ENTRY_CREDIT_CARD_OWNER', 'Credit Card Owner:');
define('ENTRY_CREDIT_CARD_NUMBER', 'Credit Card Number:');
define('ENTRY_CREDIT_CARD_EXPIRES', 'Credit Card Expires:');

// BMC CC Mod Start

 define('ENTRY_CREDIT_CARD_START', 'Credit Card Start Date:');

 define('ENTRY_CREDIT_CARD_ISSUE_NUMBER', 'Credit Card Issue Number:');

 define('ENTRY_CREDIT_CARD_CVV_NUMBER', 'Credit Card CVV Number:');

// BMC CC Mod End

define('ENTRY_SUB_TOTAL', 'Sub-Total:');
define('ENTRY_TAX', 'Tax:');
define('ENTRY_SHIPPING', 'Shipping:');
define('ENTRY_TOTAL', 'Total:');
define('ENTRY_DATE_PURCHASED', 'Date Purchased:');
define('ENTRY_STATUS', 'Status:');
define('ENTRY_DATE_LAST_UPDATED', 'Date Last Updated:');
define('ENTRY_NOTIFY_CUSTOMER', 'Notify Customer:');
define('ENTRY_NOTIFY_COMMENTS', 'Append Comments:');
define('ENTRY_PRINTABLE', 'Print Invoice');

 

In the catalog/admin/orders.php, the changes there are very simple again and shouldn't cause you any problems ... can you post the error you get, and the section(s) of code you've replaced with some of the surrounding code?

 

Then again there are also two files named 'order.php' (note the 's' missing on the end) - one in catalog/includes/classes/order.php, and one in catalog/admin/includes/classes/order.php. Do you have the right mod in the right file?

 

... do you know why the email sent to the store owner is messed up, what part of the readme file mods changes the email ??

 

The email is constructed and sent in catalog/checkout_process.php, but that file also uses ('requires') catalog/includes/classes/order.php (where the customer's order is built up into an array) so you need to check how you've added the mod to both of those files.

 

Can you post the section of code in checkout_process.php where the email is built up (from '// lets start with the email confirmation' down to the end of the file)?

 

I suppose if someone can send me acopy of their orders.php file that is working and displaying the cvv and switch issue numbers on ms2.2 I will be eternally gratefull

 

I've modded mine quite a bit, so that may confuse you more :blink: so maybe better if you check those files (and your text editor...?) and post the sections you've changed and the errors you're getting.

 

Otherwise, maybe someone else can post their file for you (when they know which one you want) .

 

:rolleyes:

Share this post


Link to post
Share on other sites

ok got all that working thanks the email sperator was the problem in the email section. But now my store is giving things away literally everything is displayed as 0 with no currency symbol either anyone had this problem before ?

Share this post


Link to post
Share on other sites

Hello

 

I am having some serious problem with this mod, I have use this mod many times before and have never noticed this problem. I have double checked and checked again, it is installed properly.

 

I was testing some of my own credit and debit card numbers and they were being accepted (Switch, Visa and Mastercard) I went into the the orders administration were I suddenly noticed the last two numbers were missing.

 

I was rather shocked to say the least at this. I went into cc_validation and decided to remove JCB, Novus, Carte Blanche, Diners Club, Australian Bankcard and Electron. And since I did this I keep receiving this error in checkout_confirmation:

 

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /homepages/19/catalog/includes/classes/cc_validation.php on line 191

Fatal error: Cannot instantiate non-existent class: cc_validation in /homepages/19/catalog/includes/modules/payment/cc.php on line 248

 

This is what is on Line 191 in cc_validation.php:

 

// function to check the number length
// Is the number the right length?
   
  if ( !( ($NumberLength == $ShouldLength)
         || ( !(empty($ShouldLength2)) && ($NumberLength == $ShouldLength2) )
         || ( !(empty($ShouldLength3)) && ($NumberLength == $ShouldLength3) ) ) ) {


         return -6;
        }
} else {          <--------------------------------------LINE 191
$this->cc_type = 'CC';
}
if ( strtolower(CC_BLACK) == 'true' ) {    

 

Line 240 in cc.php is only occuring because cc_validation is not working.

 

 

The reason why I believe cc_validation is not working is due to this particular piece of code:

 

  if ( !( ($NumberLength == $ShouldLength)
         || ( !(empty($ShouldLength2)) && ($NumberLength == $ShouldLength2) )
         || ( !(empty($ShouldLength3)) && ($NumberLength == $ShouldLength3) ) ) ) {
         return -6;
        }

 

It is not recognising credit cards that are longer than 16 digits long, since my debit card is 18 the remaing two digits were missing. HOWEVER, before I got rid of as the above mentioned credit card checks from above, this checkout_confirmation did work and my full cc number was shown with the middle digits blanked out. But in admin remaining two digits have gone.

 

Has anyone else had this problem? As I think this is very serious is numbers are just disappearing, I know the problem is entirely located in cc_validation.php but I have a limited knowledge of PHP but I do have a reference book so Im going to try to find where its going wrong.

 

If anyone else can help I thank you in advance.

 

Cheers

 

Ian

Share this post


Link to post
Share on other sites

Hi

 

Read through this thread - someone has noted this problem (16 digits max) before and a code change has been posted.

 

hth

 

:rolleyes:

Share this post


Link to post
Share on other sites

:blink:

 

I just went thru and edited our store with the newest version 1.7, now the Payment Modules does not funtion! I sure can not figure out why... I did un-install the CC modual before making these changes... although I did have a paypal modual installed, not sure if that had any thing to do with this... I see the Payment Modules, I just can not do anything with them... I tried testing my store and t works but it only allows the paypal check out now....

 

Any ideas?

 

TIA!

Share this post


Link to post
Share on other sites

Hi,

 

I just installed this contribution for the first time (1.7). I wondered if there was a reason as to why the HELP link only appears against CVV if you have all options switched on (ie Start Date, CVV and Issue) rather than another combination where CVV is left on.

 

I mean I can see why from a code perspective, ie in cc.php the pop-up reference is only in the "all on" case, as per:

 

// ++ issue ++ cvv ++ start date
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV  . ' ' .'<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_CVV, '', 'SSL') . '\')">' . MODULE_PAYMENT_CC_TEXT_CVV_LINK . '</a>', 'field' => tep_draw_input_field('cc_cvv', '', 'size=4 maxlength=4')),

 

rather than say in this case:

 

// ++ cvv -- issue ++ start date
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV, 'field' => tep_draw_input_field('cc_cvv', '', 'size=4 maxlength=4')),

 

I just wanted to check that this was a bug and there wasn't a good reason for it being there before I go changing it!

 

Also just wondered if any of you guys might know the reason why the HTML formatting isn't getting handled properly in the "Credit Card Error!" message... ie instead of applying the <b> formatting, etc, it just displays The card you have entered is a <b>JCB</b><br>At this time we do not accept <b>JCB</b> as payment.

 

This isn't a problem with this contribution per se - I noticed it before I installed it. I'm just not sure if it's a problem with 2.2MS2 or something I've introduced whlst hacking around. Anybody have any ideas how to fix it?

 

Cheers... h.

Share this post


Link to post
Share on other sites

Can anyone help me out with this one, its really baffled me.

 

All the prices in the store I am developing have disapeared. they were there one minute and gone the next.

 

I have checked the products table in the SQL database / fine the prices are all there. I have checked the currencies module and re-installed - still the same problem. I have replaced product_info.php incase there was an error in there.. Still the same issue the ? doesnt even appear just 0.

 

Will supply any info anyone wants to assist ... thanks

 

Bryan

Share this post


Link to post
Share on other sites

a little more detail, if I change the currency from pound to dollar they all appear again, I had deleted all currencies except ? I can change the currency symbol to ? for USD to get around the problem as soon as I enter GBP as the code for ? then all the figures disapear the currency values update fine though ????

Share this post


Link to post
Share on other sites
a little more detail, if I change the currency from pound to dollar they all appear again, I had deleted all currencies except ? I can change the currency symbol to ? for USD to get around the problem as soon as I enter GBP as the code for ? then all the figures disapear the currency values update fine though ????

Hi Bryanl,

 

Thanks for your PM ... I'm not an 'expert' at all though :huh: just learning like you, but I try to help if I think I can add something...

 

Don't know if this will help (don't know all of the things you've changed ...) but what do you have the value of GBP set to?

 

If GBP is set as the default (which you would need to do even more if you only had GBP, of course), it needs to have a value of 1.00000000, then you might need to do an 'update' of the currencies.

 

It might be that you haven't done anything majorly wrong ... you could try putting the other currencies back in and seeing if that restores things, then start deleting again.

 

 

:rolleyes:

Share this post


Link to post
Share on other sites

Hi all and thanks Barry for your contrib.

 

I have just installed this on OCS 2.2 ms2 with multi shop and access levels mod?s installed.

 

It all seems to work fine when gathering the CC details cvv numbers, cc number issue, etc during the order process and the info is on the db. But when I go to admin to view the orders there is nothing there!! I have read thought the forum and found only that it is good to try and reinstall the mod in payment modules through admin. I have done this a couple of times but still have not managed to see any orders.

 

My only guess was that the multi shop mod is effecting the way that the orders are displayed which conflicts with the CC mod but not having great coding skills am having trouble isolating the problem and making a solution.

 

If there is anyone out there who is running this mod with multi shop and got it working or feels like they could help me solve this problem that would be cool, or just someone with an idea.

 

Thanks


Richard

Share this post


Link to post
Share on other sites
Hi all and thanks Barry for your contrib.

 

I have just installed this on OCS 2.2 ms2 with multi shop and access levels mod?s installed.

 

It all seems to work fine when gathering the CC details cvv numbers, cc number issue, etc during the order process and the info is on the db. But when I go to admin to view the orders there is nothing there!! ............................

Fixed my know problem as usual it is an instillation error on my part due to the read me not being the clearest, also I did not read it all carefully :rolleyes: sill bugger. I have edited the read me a bit and would like to add it to the contribution or I can zip it to some one if they need it just pm me. I also think that the files included in the down should be based on stock OCS files which I can do in spare time if anyone feels that this would be a good idea.

 

Anyways bye for now


Richard

Share this post


Link to post
Share on other sites

Hello all. I have been searching but I couldn't find it. Maybe it is there but sore eyes...

 

The module is working properly but I am having a few minor problems. I can't see the cc expiry date when I go into the customers order in the admin side. All the other fields show up. The expiry dates are showing up in phpmyadmin so I am guessing that it is just looking in the wrong place. Any ideas?

 

Also, I enables the CVV part of the module but I can type in any number and it goes through. I was under the impression that would kick back an error if I did that.

 

Also in the front end. When I activate all the validation options, I get the mini pop-up link for the CVV but when I knock off one of them, it disappears. Any ideas on that one?

 

Thanks so much for your help.

 

David

Share this post


Link to post
Share on other sites

Hello,

 

I had exactly the same issue as above, bit found out I'd missed a few lines when installing, I'd suggest going thru you install again to double check as mine now works perfect :)

Share this post


Link to post
Share on other sites

For dspan & akasharkbow

 

I don't know if I missed something during the install or what, but this fixed my problem of no CVV help link while using CVV but not issue number & start date (++ cvv -- issue -- start date). If you're using a different combo, you can find the appropriate part of the code and figure it out.

 

Problem: CVV help does not show unless Admin turns on Issue Number & Start Date (& CVV).

 

Solution: In catalog/includes/modules/payment/cc.php

 

Find:

// ++ cvv -- issue -- start date
     $selection = array('id' => $this->code,
                        'module' => $this->title,
                        'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER,
                                                'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),
                                          array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER,
                                                'field' => tep_draw_input_field('cc_number')),
//             array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_START,
//                'field' => tep_draw_pull_down_menu('cc_start_month', $start_month) . ' ' . tep_draw_pull_down_menu('cc_start_year', $start_year)),
                                          array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
                                                'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year)),
            array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV,
               'field' => tep_draw_input_field('cc_cvv', '', 'size=4 maxlength=4')),
//             array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_ISSUE,
//                'field' => tep_draw_input_field('cc_issue', '', 'size=2 maxlength=2'))
));
  } elseif (( strtolower(USE_CC_CVV) == 'true' ) && ( strtolower(USE_CC_ISS) == 'true' ) && ( strtolower(USE_CC_START) != 'true' )) {

 

Replace with:

// ++ cvv -- issue -- start date
     $selection = array('id' => $this->code,
                        'module' => $this->title,
                        'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER,
                                                'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),
                                          array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER,
                                                'field' => tep_draw_input_field('cc_number')),
//             array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_START,
//                'field' => tep_draw_pull_down_menu('cc_start_month', $start_month) . ' ' . tep_draw_pull_down_menu('cc_start_year', $start_year)),
                                          array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
                                                'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year)),
                                                 array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVV  . ' ' .'<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_CVV, '', 'SSL') . '\')">' . MODULE_PAYMENT_CC_TEXT_CVV_LINK . '</a>',
                                                'field' => tep_draw_input_field('cc_cvv', '', 'size=4 maxlength=4')),
//             array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_ISSUE,
//                'field' => tep_draw_input_field('cc_issue', '', 'size=2 maxlength=2'))
));
  } elseif (( strtolower(USE_CC_CVV) == 'true' ) && ( strtolower(USE_CC_ISS) == 'true' ) && ( strtolower(USE_CC_START) != 'true' )) {

Share this post


Link to post
Share on other sites

Installed pretty much OK, but the admin section is not behaving properly.

 

Each order placed since installtion of CVV mod shows the correct 18 digit card number, card type, and expire date, but not start date, CVV number, or issue number.

 

I've done a MySQL query and the numbers are not actually being stored in the database??

 

?? Anyone ??

Edited by wondernet

Share this post


Link to post
Share on other sites

OK, read through this (long) thread and un-installed and re-installed. The MySQL query now show the encrypted number, but still not the cc_start or cc_cvv values.

 

Also, the admin/oreders.php is showing the error "Fatal error: Call to undefined function: changedataout() in /home/fhlinux195/m/musashi-uk.co.uk/user/htdocs/admin/orders.php on line 213"

 

This line is;

$order->info['cc_number'] = changedataout($cipher_data,$key);

 

?? Please

Share this post


Link to post
Share on other sites

Sorted, I hadn't uploaded the /admin/includes/functions/general.php page.

 

Soz.

Share this post


Link to post
Share on other sites

I have not seen this mentioned anywhere in this thread, but how do you unencrypt the credit card information once and order has been placed? Is this supposed to happen automatically when viewing orders in the admin panel? As it does not on mine. I get a different set of numbers/characters than what is stored in the database.

 

Please help ! :D

Share this post


Link to post
Share on other sites
I have not seen this mentioned anywhere in this thread, but how do you unencrypt the credit card information once and order has been placed? Is this supposed to happen automatically when viewing orders in the admin panel? As it does not on mine. I get a different set of numbers/characters than what is stored in the database.

 

Please help ! :D

Seems an encrypted number is fairly big character wise, have to make the varchar definition for cc_number larger than 32...

Share this post


Link to post
Share on other sites

I was searching for a solution to the problem where some VISA cards are being validated as JCB cards, but it seems like most people have switched validation off. I've moved the code for JCB validation to after the validation for VISA cards and changed the JCB validation code as follows:

 

Extract from includes/classes/cc_validation.php

// JCB - Check format according to http://www.beachnet.com/~hstiles/cardtype.html and moved to after VISA check - ncw 14-04-04
     } elseif ((ereg("^(3)[0-9]{15}", $Number)) || (ereg("^(2131|1800)[0-9]{11}$", $Number))) {
     //} elseif ( (($NumberLeft6 >= 352800) && ($NumberLeft6 <= 458999)) ) {
       $this->cc_type = 'JCB';
       $ShouldLength = 15;
       $ShouldLength2 = 16;
        if ( strtolower(MODULE_PAYMENT_CC_ACCEPT_JCB) != 'true' ) {
        return -5;
  }

 

Then in includes\modules\payment\cc.php around line 277 I've changed the code to send an email to me if errors occur rather than redirecting the customer.

      if ( ($result == false) || ($result < 1) ) {
       $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&cc_owner=' . urlencode($HTTP_POST_VARS['cc_owner']) . '&cc_expires_month=' . $HTTP_POST_VARS['cc_expires_month'] . '&cc_expires_year=' . $HTTP_POST_VARS['cc_expires_year'];

//  email errors to Admin instead of redirecting customer when card is not valid - ncw 14-04-04
 $errMessage = "\nThis is an automated message.\n\nA customer has just entered their credit card details at " . STORE_NAME . " and the following error was detected:" . "\n\nError: " . $error . "\nCard owner: " . $HTTP_POST_VARS['cc_owner'] . "\nCard type recognised as: " . $cc_validation->cc_type;
 mail("me@somedomain.co.uk",STORE_NAME . ": Credit Card Validation Error",$errMessage,"From:me@somedomain.co.uk");

// 	 following line has been commented out whilst testing - ncw 14-04-04
//        tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
     }

 

I shall monitor this to see if we get errors with validation on other card numbers.

Share this post


Link to post
Share on other sites

I have followed all of the instructions per the readme file and the credit cards go through with no problem and the emails arrive no problem but when i click on orders received and click on a name and click on edit, remove cc info, invoice, or packaging slip I get the following error.

 

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]

 

 

Anyone have an idea as to what I have done wrong or missed?

I would really appreciate the help. Lisa

Share this post


Link to post
Share on other sites

cdubshon had the product serial number contrib installed, but the insert for sql was missing. Added and fixed.


9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Share this post


Link to post
Share on other sites

:D Thank you very, very, much Noel for helping me with it. I would hug you if I could reach you! Lord knows how long I would have been wracking my brain on this. Again I say Thank you. Lisa

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  

×