Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Linkpoint API - Storing CC #s


dompazz

Recommended Posts

I just installed the Linkpoint API module and it works great! The only problem I see with it is that it stores the customer's CC# in the database. Because I can get this information from YourPay, and I want to limit the chances of a customer's CC being stolen, I am looking for a way to xxx out the CC# except for the last 4 digits.

 

Does anyone have a way to accomplish this?

Link to comment
Share on other sites

I have just noticed the same thing when trying to find out why the shipping, order id, and tax were not being passed.

 

To fix the cc number storage you can edit /catalog/checkout_process.php around line 92

->billing['lastname'],
					 'billing_company' => $order->billing['company'],
					 'billing_street_address' => $order->billing['street_address'],
					 'billing_suburb' => $order->billing['suburb'],
					 'billing_city' => $order->billing['city'],
					 'billing_postcode' => $order->billing['postcode'],
					 'billing_state' => $order->billing['state'],
					 'billing_country' => $order->billing['country']['title'],
					 'billing_address_format_id' => $order->billing['format_id'],
					 'payment_method' => $order->info['payment_method'],
					 'cc_type' => $order->info['cc_type'],
					 'cc_owner' => $order->info['cc_owner'],
					 'cc_number' => $order->info['cc_number'],
					 'cc_expires' => $order->info['cc_expires'],
					 'date_purchased' => 'now()',
					 'orders_status' => $order->info['order_status'],
					 'currency' => $order->info['currency'],
					 'currency_value' => $order->info['currency_value']);
tep_db_perform(TABLE_ORDERS, $sql_data_array);
$insert_id = tep_db_insert_id();

 

change the line

'cc_number' => $order->info['cc_number'],

 

to

'cc_number' => '',

 

or to just save the last 4

'cc_number' => substr($order->info['cc_number'], -4),

 

My main problem with this API is that it doesnt seem to be passing the order id, tax and shipping to linkpoint. I checked the code and noticed that the code for these items are commented out. I removed the comments and durning the debug it seems to pass all the right info now but is still missing the order id. Its too hard to try to match linkpoints own order# to the store order number.

These are the lines in question. If anyone knows why these are commented out please let me know.

	$myorder["transactionorigin"] = "ECI";		   // For credit card retail txns, set to RETAIL, for Mail order/telephone order, set to MOTO, for e-commerce, leave out or set to ECI
//	$myorder["oid"]			   = "";  // Order ID number must be unique. If not set, gateway will assign one.
$myorder["ponumber"]		  = "1002";  // Needed for business credit cards
$myorder["taxexempt"]		  = "Y";  // Needed for business credit cards
$myorder["terminaltype"]	  = "UNSPECIFIED";	// Set terminaltype to POS for an electronic cash register or integrated POS system, STANDALONE for a point-of-sale credit card terminal, UNATTENDED for a self-service station, or UNSPECIFIED for e-commerce or other applications
$myorder["ip"]				= $_SERVER['REMOTE_ADDR'];

//	$myorder["subtotal"]	= $order->info['subtotal'];
//	$myorder["tax"]		 = $order->info['tax'];
//	$myorder["shipping"]	= $order->info['shipping_cost'];
$grantotal = number_format($order->info['total'], 2);
  $myorder["chargetotal"] = str_replace(",", "", $grantotal);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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