MoisesZaragoza Posted August 4, 2006 Posted August 4, 2006 I made some modification to the CC mod but i cant finde the insert to the orders table Thanks at the end of the day the code will be good
Gil_e_n Posted August 4, 2006 Posted August 4, 2006 Assuming I've understood what you asked correctly, inserting the cc number into the database (at least with the default cc payment module) is done in checkout_process here: 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], //Credit Card Encryption with Mcrypt begin //Original code: //'cc_number' => $order->info['cc_number'], 'cc_number' => $cc_number_crypt, //Credit Card Encryption with Mcrypt end 'cc_expires' => $order->info['cc_expires'], //begin cvv contribution 'cvvnumber' => $order->info['cvvnumber'], //end cvv contribution I'm not bothering to strip out the contributions I have installed; your code is almost certainly different. 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
MoisesZaragoza Posted August 4, 2006 Author Posted August 4, 2006 Thanks I think that I found that but it's still not writing to the DB at the end of the day the code will be good
MoisesZaragoza Posted August 4, 2006 Author Posted August 4, 2006 This is the info from :checkout_process.php $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 IMfo 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], 'cvvnumber' => $order->info['cvvnumber'], # the line I ADDED 'date_purchased' => 'now()', 'orders_status' => $order->info['order_status'], 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value']); The info for CC function confirmation() { global $HTTP_POST_VARS; $confirmation = array('title' => $this->title . ': ' . $this->cc_card_type, 'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER, 'field' => $HTTP_POST_VARS['cc_owner']), array('title' => MODULE_PAYMENT_CC_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_CC_TEXT_CREDIT_CARD_EXPIRES, 'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['cc_expires_month'], 1, '20' . $HTTP_POST_VARS['cc_expires_year']))))); return $confirmation; } and function process_button() { global $HTTP_POST_VARS; $process_button_string = tep_draw_hidden_field('cc_owner', $HTTP_POST_VARS['cc_owner']) . tep_draw_hidden_field('cc_expires', $HTTP_POST_VARS['cc_expires_month'] . $HTTP_POST_VARS['cc_expires_year']) . tep_draw_hidden_field('cc_type', $this->cc_card_type) . tep_draw_hidden_field('cc_number', $this->cc_card_number) . tep_draw_hidden_field('cvvnumber', $this->cvvnumber); return $process_button_string; } at the end of the day the code will be good
Gil_e_n Posted August 4, 2006 Posted August 4, 2006 Try adding array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_CVVNUMBER, 'field' => $HTTP_POST_VARS['cvvnumber']))); // end cvv contribution to the function confirmation. See if it shows up in checkout_confirmation then. If not, try posting your whole cc file. 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
MoisesZaragoza Posted August 4, 2006 Author Posted August 4, 2006 I tryed doing that but it displayed the CVV Number on the page and still did not add to the DB so i took it out again at the end of the day the code will be good
MoisesZaragoza Posted August 4, 2006 Author Posted August 4, 2006 What i did was $confirmation = array('title' => $this->title . ': ' . $this->cc_card_type, 'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER, 'field' => $HTTP_POST_VARS['cc_owner']), array('title' => MODULE_PAYMENT_CC_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_CC_TEXT_CREDIT_CARD_CVVNUMBER, # 'field' => $HTTP_POST_VARS['cvvnumber']) . str_repeat('X', (strlen( $HTTP_POST_VARS['cvvnumber'])) , array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES, 'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['cc_expires_month'], 1, '20' . $HTTP_POST_VARS['cc_expires_year']))))); return $confirmation; } at the end of the day the code will be good
Recommended Posts
Archived
This topic is now archived and is closed to further replies.