Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CVS code added to checkout_process.php not workin


MidOhioIT

Recommended Posts

In the code osc/checkoutprocess.php I added the last line in this code section:

 

 $sql_data_array = array('customers_id' => $customer_id,
					  'customers_name' => $order->customer['firstname'] . ' ' .	$order->customer['lastname'],
					  'customers_company' => $order->customer['company'],
					  'customers_street_address' => $order->customer['street_address'],
					  'customers_suburb' => $order->customer['suburb'],
					  'customers_city' => $order->customer['city'],
					  'customers_postcode' => $order->customer['postcode'], 
					  'customers_state' => $order->customer['state'], 
					  'customers_country' => $order->customer['country']['title'], 
					  'customers_telephone' => $order->customer['telephone'], 
					  'customers_email_address' => $order->customer['email_address'],
					  'customers_address_format_id' => $order->customer['format_id'], 
					  'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 
					  'delivery_company' => $order->delivery['company'],
					  'delivery_street_address' => $order->delivery['street_address'], 
					  'delivery_suburb' => $order->delivery['suburb'], 
					  'delivery_city' => $order->delivery['city'], 
					  'delivery_postcode' => $order->delivery['postcode'], 
					  'delivery_state' => $order->delivery['state'], 
					  'delivery_country' => $order->delivery['country']['title'], 
					  'delivery_address_format_id' => $order->delivery['format_id'], 
					  'billing_name' => $order->billing['firstname'] . ' ' . $order->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'],
											  'cc_code' => $order->info['cc_code']  );

 

 

and also added the last 2 lines in this code section ( /osc/includes/modules/payment/cc.php):

	  
$confirmation = array('fields' => 
array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER,
	  'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER,
	 'field' => tep_draw_input_field('cc_number_nh-dns')),
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
	 'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year)),
array ('title' => MODULE_PAYMENT_CC_TEXT_CC_CVS_CODE,
	'field' => tep_draw_input_field('cc_code'))	));

 

The code does not break and it will let you process the order, but it will not store the CVS code on the database, it is populated as in empty field, if it didnt do anything I would have expected the field to be null but it is like it is stored as a space on the db. Any ideas??

Link to comment
Share on other sites

In the code osc/checkoutprocess.php I added the last line in this code section:

 

 $sql_data_array = array('customers_id' => $customer_id,
					  'customers_name' => $order->customer['firstname'] . ' ' .	$order->customer['lastname'],
					  'customers_company' => $order->customer['company'],
					  'customers_street_address' => $order->customer['street_address'],
					  'customers_suburb' => $order->customer['suburb'],
					  'customers_city' => $order->customer['city'],
					  'customers_postcode' => $order->customer['postcode'], 
					  'customers_state' => $order->customer['state'], 
					  'customers_country' => $order->customer['country']['title'], 
					  'customers_telephone' => $order->customer['telephone'], 
					  'customers_email_address' => $order->customer['email_address'],
					  'customers_address_format_id' => $order->customer['format_id'], 
					  'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 
					  'delivery_company' => $order->delivery['company'],
					  'delivery_street_address' => $order->delivery['street_address'], 
					  'delivery_suburb' => $order->delivery['suburb'], 
					  'delivery_city' => $order->delivery['city'], 
					  'delivery_postcode' => $order->delivery['postcode'], 
					  'delivery_state' => $order->delivery['state'], 
					  'delivery_country' => $order->delivery['country']['title'], 
					  'delivery_address_format_id' => $order->delivery['format_id'], 
					  'billing_name' => $order->billing['firstname'] . ' ' . $order->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'],
											  'cc_code' => $order->info['cc_code']  );

 

 

and also added the last 2 lines in this code section ( /osc/includes/modules/payment/cc.php):

	  
$confirmation = array('fields' => 
array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER,
	  'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER,
	 'field' => tep_draw_input_field('cc_number_nh-dns')),
array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
	 'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year)),
array ('title' => MODULE_PAYMENT_CC_TEXT_CC_CVS_CODE,
	'field' => tep_draw_input_field('cc_code'))	));

 

The code does not break and it will let you process the order, but it will not store the CVS code on the database, it is populated as in empty field, if it didnt do anything I would have expected the field to be null but it is like it is stored as a space on the db. Any ideas??

 

Can anyone help me please? If the way I worded it is confusing, please let me know.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...