Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Last Four of Credit Card in Invoice Emails

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 01-21-2010, 10:54 AM
 
GFaulkner GFaulkner is offline
 

Newbie
  
Join Date: Sep 2008
Posts: 6
 

Default Re: Last Four of Credit Card in Invoice Emails

I am trying to do a similar thing with the credit card number. Can you send over your finalized code that works?

Thanks,
Greg
__________________
Version 4.1.10
Reply With Quote
  #22  
Old 01-26-2010, 08:26 AM
 
rshandel rshandel is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 125
 

Default Re: Last Four of Credit Card in Invoice Emails

In payment_cc.php

Replace code between



#
# Make order details
#


and
#
# Only logged users can submit orders
#


with this:
Code:
#rs $store_card_number=$card_number; $card_number = substr($card_number,-4); #/rs $_order_details_rval = array(); foreach (func_order_details_fields() as $_details_field => $_field_label) { if (isset($GLOBALS[$_details_field])) { $_order_details_rval[] = $_field_label.": ".stripslashes($GLOBALS[$_details_field]); } } #rs $card_number = $store_card_number; #/rs $order_details = implode("\n", $_order_details_rval); $customer_notes = $Customer_Notes;


Then after
#
# If successful - Store CC number in database
#

add
Code:
#rs $new_card_number==substr($card_number,-4); #/rs

Find
Code:
"card_number" => addslashes(text_crypt($card_number)),

Replace with:
Code:
#"card_number" => addslashes(text_crypt($card_number)), #rs "card_number" => addslashes(text_crypt($new_card_number)), #/rs

In payment_ccend.php:

add

Code:
#rs $store_card_number=$card_number; $card_number = substr($card_number,-4); #/rs


after

Code:
if ($bill_error) { $request = $current_location.DIR_CUSTOMER."/error_message.php?".$sessurl."error=".$bill_error.$reason; } else {


add

Code:
#rs $card_number = $store_card_number; #/rs


after

Code:
if (!empty($active_modules['SnS_connector'])) { func_generate_sns_action("CartChanged"); }

Good luck!
__________________
x-cart 4.1.12
x-cart 4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:48 PM.

   

 
X-Cart forums © 2001-2020