Zen Cart Logo
Forums / Managing Customers and Orders / Credit card number in E-mail order confirmation

Credit card number in E-mail order confirmation

Locked

Views: 8,527

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
25 Sep 2007, 4:04 PM
#1
sanchopanza avatar

sanchopanza

New Zenner

Join Date:
Sep 2007
Posts:
23
Plugin Contributions:
0

Credit card number in E-mail order confirmation

Order confirmation sent by e-mail to a customer doesn't include a credit card number used while ordering... Is it possible to make e-mail order confirmation the SAME as it appears once the order is made online?

25 Sep 2007, 4:09 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

What payment modules are you using?

26 Sep 2007, 4:26 AM
#3
wolfsz avatar

wolfsz

Zen Follower

Join Date:
Mar 2006
Location:
Australia
Posts:
286
Plugin Contributions:
3

Re: Credit card number in E-mail order confirmation

Hi there
CC # is private information and should never be emailed! I would be very unhappy if I where a customer of your and you would put my CC # in my order confirmation.

26 Sep 2007, 7:49 AM
#4
sanchopanza avatar

sanchopanza

New Zenner

Join Date:
Sep 2007
Posts:
23
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Kim:

What payment modules are you using?

I'm using:

  • credit card;
  • check/money order.
26 Sep 2007, 7:53 AM
#5
sanchopanza avatar

sanchopanza

New Zenner

Join Date:
Sep 2007
Posts:
23
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

wolfsz:

Hi there
CC # is private information and should never be emailed! I would be very unhappy if I where a customer of your and you would put my CC # in my order confirmation.

I don't want to e-mail the whole information about the credit card, but just like in the order confirmation that appears online before you receive your order confirmation by e-mail... like only - credit card type and credit card number in the form like 4111XXXXXXXX1111, so the customer can remember what credit card he uses as he usually has a number of them.

28 Sep 2007, 4:43 PM
#6
sanchopanza avatar

sanchopanza

New Zenner

Join Date:
Sep 2007
Posts:
23
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Any suggestions???

28 Sep 2007, 5:32 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Credit card number in E-mail order confirmation

SanchoPanza:

only - credit card type and credit card number in the form like 4111XXXXXXXX1111, so the customer can remember what credit card he uses as he usually has a number of them.

Is this a complaint you get from your customers on a regular basis?

29 Sep 2007, 3:07 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Credit card number in E-mail order confirmation

/includes/classes/order.php
line 942:if (is_object($GLOBALS[$_SESSION['payment']])) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $_SESSION['payment']; $email_order .= $GLOBALS[$payment_class]->title . "\n\n"; $email_order .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . "\n\n" : ''; $email_order .= ($GLOBALS[$payment_class]->email_footer) ? $GLOBALS[$payment_class]->email_footer . "\n\n" : ''; } else { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $email_order .= PAYMENT_METHOD_GV . "\n\n"; } $html_msg['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD; $html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV ); $html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '') ? nl2br($GLOBALS[$payment_class]->email_footer) : $this->info['cc_type'];change to:```
if (is_object($GLOBALS[$_SESSION['payment']])) {
$cc_num_display = (isset($this->info['cc_number']) && $this->info['cc_number'] != '') ? substr($this->info['cc_number'], 0, 4) . str_repeat('X', (strlen($this->info['cc_number']) - 8)) . substr($this->info['cc_number'], -4) . "\n\n" : '';
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
EMAIL_SEPARATOR . "\n";
$payment_class = $_SESSION['payment'];
$email_order .= $GLOBALS[$payment_class]->title . "\n\n";
$email_order .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '';
$email_order .= ($GLOBALS[$payment_class]->email_footer) ? $GLOBALS[$payment_class]->email_footer . "\n\n" : '';
} else {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
EMAIL_SEPARATOR . "\n";
$email_order .= PAYMENT_METHOD_GV . "\n\n";
}
$html_msg['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD;
$html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );
$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '') ? nl2br($GLOBALS[$payment_class]->email_footer) : (isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '');

13 Feb 2008, 9:53 PM
#9
gicon avatar

gicon

New Zenner

Join Date:
Feb 2008
Posts:
7
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Thanks, This was helpful to me as well. :)

13 Feb 2008, 10:27 PM
#10
gicon avatar

gicon

New Zenner

Join Date:
Feb 2008
Posts:
7
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Actually, upon further investigation.. All I did was break things :P

So.. here is where I'm at.

I have a modified order.php already due to using the purchase order addon.

My order.php is as follows.```
if (is_object($GLOBALS[$_SESSION['payment']])) {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
EMAIL_SEPARATOR . "\n";
$payment_class = $_SESSION['payment'];
$email_order .= $GLOBALS[$payment_class]->title . "\n\n";

  if ($this->info['cc_type']){
    $email_order .= $GLOBALS[$payment_class]->email_footer . $this->info['cc_type'] ;
	} else {
	$email_order .= $GLOBALS[$payment_class]->email_footer . "\n\n" . "Account Name: " . $this->info['account_name'] . "\nAccount Number: " . $this->info['account_number'] . "\nPO Number: " . $this->info['po_number'] ;
	 }
// ************************END THIS CONTROLS THE HTML EMAIL USING CREDIT CARD AND MERLIN PURCHASE ORDER MOD FOR 1.3.7*****************
 	  
} else {
  $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
  EMAIL_SEPARATOR . "\n";
  $email_order .= PAYMENT_METHOD_GV . "\n\n";
}
$html_msg['PAYMENT_METHOD_TITLE']  = EMAIL_TEXT_PAYMENT_METHOD;
$html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );

// *******BEGIN THIS CONTROLS THE HTML EMAIL USING CREDIT CARD AND MERLIN PURCHASE ORDER MOD FOR 1.3.7
if ($this->info['cc_type']){
$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']] && $GLOBALS[$payment_class]->email_footer != '') ? $GLOBALS[$payment_class]->email_footer : $this->info['cc_type'] );
}else{
$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']] && $GLOBALS[$payment_class]->email_footer != '') ? $GLOBALS[$payment_class]->email_footer : "Account Name: " . $this->info['account_name'] . "\n\n" . "<br>Account Number: " . $this->info['account_number'] . "\n\n" . "<br>PO Number: " . $this->info['po_number'] );
}
// ************************END THIS CONTROLS THE HTML EMAIL USING CREDIT CARD AND MERLIN PURCHASE ORDER MOD FOR 1.3



What changes and where would I need to make to enable this funcionality?

Thanks a million in advance!
14 Feb 2008, 6:20 PM
#11
gicon avatar

gicon

New Zenner

Join Date:
Feb 2008
Posts:
7
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Alright, I managed to -=read=- the code and actually figure out how to implement this on my own. First try even. :D Definitely throwing some self applause there. (if you only knew how green I am to programming...)

So, I'm including what I did to accomplish this in hopes it might be useful to someone else who is using the Purchase Order module as well.

if (is_object($GLOBALS[$_SESSION['payment']])) {
      $cc_num_display = (isset($this->info['cc_number']) && $this->info['cc_number'] != '') ? substr($this->info['cc_number'], 0, 4) . str_repeat('X', (strlen($this->info['cc_number']) - 8)) . substr($this->info['cc_number'], -4) . "\n\n" : '';
      $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
      EMAIL_SEPARATOR . "\n";
      $payment_class = $_SESSION['payment'];
      $email_order .= $GLOBALS[$payment_class]->title . "\n\n";
	$email_order .= (isset($this->info['cc_type']) && $this->info['cc_type'] != '') ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '';  

	
	  if ($this->info['cc_type']){
        $email_order .= $GLOBALS[$payment_class]->email_footer . $this->info['cc_type'] ;
		} else {
		$email_order .= $GLOBALS[$payment_class]->email_footer . "\n\n" . "Account Name: " . $this->info['account_name'] . "\nAccount Number: " . $this->info['account_number'] . "\nPO Number: " . $this->info['po_number'] ;
		 }
	// ************************END THIS CONTROLS THE HTML EMAIL USING CREDIT CARD AND MERLIN PURCHASE ORDER MOD FOR 1.3.7*****************
     	  
    } else {
      $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
      EMAIL_SEPARATOR . "\n";
      $email_order .= PAYMENT_METHOD_GV . "\n\n";
    }
    $html_msg['PAYMENT_METHOD_TITLE']  = EMAIL_TEXT_PAYMENT_METHOD;
    $html_msg['PAYMENT_METHOD_DETAIL'] = (is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV );
	$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '') ? nl2br($GLOBALS[$payment_class]->email_footer) : (isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '');

// ************************BEGIN THIS CONTROLS THE HTML EMAIL USING CREDIT CARD AND MERLIN PURCHASE ORDER MOD FOR 1.3.7*****************
	if ($this->info['cc_type']){
    $html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']] && $GLOBALS[$payment_class]->email_footer != '') ? $GLOBALS[$payment_class]->email_footer : $this->info['cc_type'] );
}else{ 
$html_msg['PAYMENT_METHOD_FOOTER'] = (is_object($GLOBALS[$_SESSION['payment']] && $GLOBALS[$payment_class]->email_footer != '') ? $GLOBALS[$payment_class]->email_footer : "Account Name: " . $this->info['account_name'] . "\n\n" . "<br>Account Number: " . $this->info['account_number'] . "\n\n" . "<br>PO Number: " . $this->info['po_number'] );
}
// ************************END THIS CONTROLS THE HTML EMAIL USING CREDIT CARD AND MERLIN PURCHASE ORDER MOD FOR 1.3.7*****************
    // include disclaimer

Now.. my next question is how can I have it include the ACT code and the expiration date?

My main goal here is to have an email that will shoot out to our book keeper in another state with all the necessary information.. without giving her any access to the admin area of the ZenCart.. only bad things can come from that..

So here's to hoping someone can help me out or at least steer me in the right direction :D

Thanks in Advance!:smartalec:

18 Feb 2008, 2:33 PM
#12
gicon avatar

gicon

New Zenner

Join Date:
Feb 2008
Posts:
7
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

right right.. thanks. wonderful help. :unsure:

18 Feb 2008, 6:35 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Credit card number in E-mail order confirmation

The code I posted above is already built-in to v1.3.8.
And so are some fixes which previously prevented modules such as the purchase order module from displaying all its appropriate footer contents in the email.

Perhaps you just need to upgrade?
And maybe apply the appropriate fix to your p.o. module.

24 Mar 2008, 3:19 AM
#14
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Hi,

I have version 1.3.8a. Regarding cc# in the email confirmation. My email confirmations used to say just this:

Payment Method

Credit Card

MasterCard

Now they say this:

Payment Method

Credit Card

Visa 1111XXXXXXXX1111

How do I change it back to the way it was, or at least change it to:

Payment Method

Credit Card

Visa XXXXXXXXXXXX1111

Thanks.

26 Mar 2008, 3:47 AM
#15
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Anyone know how to edit 1.3.8a to show cc info in the confirmation with just the last 4 numbers showing?

Payment Method

Credit Card

Visa XXXXXXXXXXXX1111

Thanks.

26 Mar 2008, 4:47 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Credit card number in E-mail order confirmation

You could just do the reverse of what I posted above for the person who wanted it the way you don't seem to want it.

26 Mar 2008, 4:24 PM
#17
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

Thanks for the reply. I was wondering about that. So is that the way 1.3.7 used to handle it and it was changed in 1.3.8a?

Was there any reason the format was changed in 1.3.8a? Was it done to comply with new standards? Or do both formats comply with current standards?

Thanks.

26 Mar 2008, 4:57 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Credit card number in E-mail order confirmation

Correct, it was changed in 1.3.8. I suppose we could have added a switch so you could use it one way or the other.

Is there a particular reason why you don't want to give your customers an idea of which card they actually used to make their payment?

26 Mar 2008, 5:03 PM
#19
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Credit card number in E-mail order confirmation

I still want them to be able to identify which card they used and they should be able to by the format. The last four digits should be sufficient to identify their card. No?

Payment Method

Credit Card

Visa XXXXXXXXXXXX1111

I just think when dealing with cc numbers, less is better.

26 Mar 2008, 5:14 PM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Credit card number in E-mail order confirmation

As you wish ... it's open source. Feel free to change it to operate however you like.