Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to get cc_owner written to database table orders?


golfman2006

Recommended Posts

Posted

cc_owner is not being populated on the table "orders". When I look in SQL, all other values cc_type, cc_number and cc_expires are all updateing properly. Any ideas where to find the file/code that inserts into this orders table?

Posted

Look in catalog/includes/modules/payment/cc.php.

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Posted
Look in catalog/includes/modules/payment/cc.php.

 

Thank you for the reply....Actually, I am using the Authorize.net AIM contribution, so would I be looking at catalog/includes/modules/payment/authorizenet_aim.php instead? Is there a particular piece of code I should be looking for?

 

Thanks again for your help!

Posted

Yes, if you're using that contribution, that's where you should look. I personally don't use that, so I'm not sure. But my guess would be that the error would lie in a bit of code similar to this:

'fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_owner',

Or really any code that has cc_owner in it. If I were you, I'd just do a search for all instances of cc_owner, and look there for places where the pattern of the code is different from the rest of the credit card variables.

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Posted
Yes, if you're using that contribution, that's where you should look. I personally don't use that, so I'm not sure. But my guess would be that the error would lie in a bit of code similar to this:
'fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_owner',

Or really any code that has cc_owner in it. If I were you, I'd just do a search for all instances of cc_owner, and look there for places where the pattern of the code is different from the rest of the credit card variables.

 

Great...Thanks for the explanation. I will look for similar code in this Authorize.net AIM module and post back here what I find to resolve it.

 

Thanks again for your help.....!

Posted
Great...Thanks for the explanation. I will look for similar code in this Authorize.net AIM module and post back here what I find to resolve it.

 

Thanks again for your help.....!

 

It looks like my authorize.net.php file looks consistent with the cc.php payment module when searching on cc_owner.

 

Here is the code to display on checkout_confirmation correctly which is currently happening. I don't think this code is this issue as this is the function selection.

	// Display Credit Card information on the checkout_payment.php page
function selection() {
  global $order;

  for ($i=1; $i<13; $i++) {
	$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));
  }

  $today = getdate();
  for ($i=$today['year']; $i < $today['year']+10; $i++) {
	$expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));
  }
  if (MODULE_PAYMENT_AUTHORIZENET_AIM_USE_CVV == 'True') {
  $selection = array('id' => $this->code,
					 'module' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CATALOG_TITLE,
					 'fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),
									   array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_NUMBER,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_number')),
									   array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_EXPIRES,
											 'field' => tep_draw_pull_down_menu('authorizenet_aim_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('authorizenet_aim_cc_expires_year', $expires_year)),
									   array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CVV,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_cvv','',"size=4, maxlength=4") . ' <a style="cursor: pointer; cursor: hand;" onClick="window.open(\'cvv_help.php\',\'jav\',\'width=500,height=550,resizable=no,toolbar=no,menubar=no,status=no\')"><u>Click for info on CVV</u></a>')));
  } else {
  $selection = array('id' => $this->code,
					 'module' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CATALOG_TITLE,
					 'fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),
									   array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_NUMBER,
											 'field' => tep_draw_input_field('authorizenet_aim_cc_number')),
									   array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_EXPIRES,
											 'field' => tep_draw_pull_down_menu('authorizenet_aim_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('authorizenet_aim_cc_expires_year', $expires_year))));
  }
  return $selection;
}

 

Then, later on in the code, there is another reference but as function_confirmation as shown below. Could it be this code that is not allowing the cc_owner field to be written to the orders table? All other fields are correctly written, such as cc_number, cc_type.

	// Display Credit Card Information on the Checkout Confirmation Page
function confirmation() {
  global $HTTP_POST_VARS;

  if (MODULE_PAYMENT_AUTHORIZENET_AIM_USE_CVV == 'True') {
  $confirmation = array(//'title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CATALOG_TITLE, // Redundant
						'fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_TYPE,
												'field' => $this->cc_card_type),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER,
												'field' => $HTTP_POST_VARS['authorizenet_aim_cc_owner']),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_NUMBER,
												'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_EXPIRES,
												'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['authorizenet_aim_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['authorizenet_aim_cc_expires_year']))),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CVV,
												'field' => $HTTP_POST_VARS['authorizenet_aim_cc_cvv'])));
  } else {
  $confirmation = array(//'title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CATALOG_TITLE, // Redundant
						'fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_TYPE,
												'field' => $this->cc_card_type),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_OWNER,
												'field' => $HTTP_POST_VARS['authorizenet_aim_cc_owner']),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_NUMBER,
												'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),
										  array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_CREDIT_CARD_EXPIRES,
												'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['authorizenet_aim_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['authorizenet_aim_cc_expires_year'])))));
  }

  return $confirmation;
}

 

Here is te last bit of code I see related to cc-owner which works with function process_button.

	function process_button() {
  // Hidden fields on the checkout confirmation page
  $process_button_string = tep_draw_hidden_field('cc_owner', $HTTP_POST_VARS['authorizenet_aim_cc_owner']) .
						   tep_draw_hidden_field('cc_expires', $this->cc_expiry_month . substr($this->cc_expiry_year, -2)) .
						   tep_draw_hidden_field('cc_type', $this->cc_card_type) .
						   tep_draw_hidden_field('cc_number', $this->cc_card_number);
  if (MODULE_PAYMENT_AUTHORIZENET_AIM_USE_CVV == 'True') {
	$process_button_string .= tep_draw_hidden_field('cc_cvv', $HTTP_POST_VARS['authorizenet_aim_cc_cvv']);
  }

 

Any help is greatly appreciated! Jut need to get the cc_owner field to write to the database table 'orders"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...