Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

We do our own credit card charges, so we need to know what the credit card number was used. I have tried to find in the Admin Section of OSC where to turn this on so that it will be included in the order email, but I don't think it exists. Can anyone tell me how to get the credit card number added in the order that we receive from the customer? Thanks

  • 4 weeks later...
Posted

This worked for me some time ago, but I removed it - too insecure, but if you must ... hope it helps

 

If you want the FULL credit card number to be displayed in the Admin Order Details as 1234123412341234 AND you want this sent to you by e-mail as the EXTRA ORDER E-MAIL, do the following:

 

Please Note:

You must be on a secure server and you must check with your Merchant Account provider to be certain you are able to do this before making the following changes.

 

Open catalog/includes/modules/payment/cc.php

 

Look for and replace the following 3 functions:

 

function process_button ()

function before_process ()

function after_process ()

 

Replace them with this:

 

function process_button() {

global $HTTP_POST_VARS;

 

$process_button_string = tep_draw_hidden_field('cc_owner', $HTTP_POST_VARS['cc_owner']) .

tep_draw_hidden_field('cc_expires', $HTTP_POST_VARS['cc_expires_month'] . $HTTP_POST_VARS['cc_expires_year']) .

tep_draw_hidden_field('cc_type', $this->cc_card_type) .

tep_draw_hidden_field('cc_number', $HTTP_POST_VARS['cc_number']);

 

return $process_button_string;

}

 

function before_process() {

return false;

}

 

function after_process() {

global $HTTP_POST_VARS, $insert_id;

 

if ( (defined('MODULE_PAYMENT_CC_EMAIL')) && (tep_validate_email(MODULE_PAYMENT_CC_EMAIL)) ) {

$message = 'Order #' . $insert_id . "\nCustomer's Credit Card Info\n\nCredit Card Info:\n============\n" . tep_db_prepare_input($HTTP_POST_VARS['cc_owner']) . "\n" . tep_db_prepare_input($HTTP_POST_VARS['cc_type']) . "\n" . tep_db_prepare_input($HTTP_POST_VARS['cc_number']) . "\n" . tep_db_prepare_input($HTTP_POST_VARS['cc_expires']) . "\nCVV Security Code: " . tep_db_prepare_input($HTTP_POST_VARS['cvvnumber']) . "\n\n";

 

tep_mail(STORE_OWNER, MODULE_PAYMENT_CC_EMAIL, STORE_NAME . 'Order #' . $insert_id, $message, tep_db_prepare_input($HTTP_POST_VARS['cc_owner']), STORE_OWNER_EMAIL_ADDRESS);

}

}

 

 

Graeme

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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