Jump to content

frohco

Members
  • Content count

    7
  • Joined

  • Last visited

  1. frohco

    One Page Checkout Support

    sorry about the stupid smiley its just a "$B" without the quotes("")
  2. frohco

    One Page Checkout Support

    Here is the Authorize.net aim code I slightly modified. I'm currently running it live and it works for my customers. Good luck. <?php /* $Id: authorizenet_cc_aim.php 1803 2008-01-11 18:16:37Z hpdl $ * modified to work with One Page Checkout Contribution* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2008 osCommerce Released under the GNU General Public License */ class authorizenet_cc_aim { var $code, $title, $description, $enabled; // class constructor function authorizenet_cc_aim() { global $order; $this->signature = 'authorizenet|authorizenet_cc_aim|1.0|2.2'; $this->code = 'authorizenet_cc_aim'; $this->title = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TEXT_TITLE; $this->public_title = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TEXT_PUBLIC_TITLE; $this->description = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_AUTHORIZENET_CC_AIM_STATUS == 'True') ? true : false); if ((int)MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { return false; } function selection() { /* One Page Checkout - BEGIN */ $js = ''; /* One Page Checkout - END */ return array('id' => $this->code, 'module' => $this->public_title); } function pre_confirmation_check() { return false; } function confirmation() { global $order, $HTTP_POST_VARS; for ($i=1; $i<13; $i++) { $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => "(" . $i . ") " . 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))); } $confirmation = array('fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('cc_number_nh-dns')), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_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_AUTHORIZENET_CC_AIM_CREDIT_CARD_CVC, 'field' => tep_draw_input_field('cc_cvc_nh-dns',"",'size="5" maxlength="4"')))); return $confirmation; } function process_button() { return false; } function before_process() { global $HTTP_POST_VARS, $customer_id, $order, $sendto, $currency; $params = array('x_login' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID, 0, 20), 'x_tran_key' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY, 0, 16), 'x_version' => '3.1', 'x_delim_data' => 'TRUE', 'x_delim_char' => ',', 'x_encap_char' => '"', 'x_relay_response' => 'FALSE', 'x_first_name' => substr($order->billing['firstname'], 0, 50), 'x_last_name' => substr($order->billing['lastname'], 0, 50), 'x_company' => substr($order->billing['company'], 0, 50), 'x_address' => substr($order->billing['street_address'], 0, 60), 'x_city' => substr($order->billing['city'], 0, 40), 'x_state' => substr($order->billing['state'], 0, 40), 'x_zip' => substr($order->billing['postcode'], 0, 20), 'x_country' => substr($order->billing['country']['title'], 0, 60), 'x_phone' => substr($order->customer['telephone'], 0, 25), 'x_cust_id' => substr($customer_id, 0, 20), 'x_customer_ip' => tep_get_ip_address(), 'x_email' => substr($order->customer['email_address'], 0, 255), 'x_description' => substr(STORE_NAME, 0, 255), 'x_amount' => substr($this->format_raw($order->info['total']), 0, 15), 'x_currency_code' => substr($currency, 0, 3), 'x_method' => 'CC', 'x_type' => ((MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_METHOD == 'Capture') ? 'AUTH_CAPTURE' : 'AUTH_ONLY'), 'x_card_num' => $HTTP_POST_VARS['cc_number_nh-dns'], 'x_exp_date' => $HTTP_POST_VARS['cc_expires_month'] . $HTTP_POST_VARS['cc_expires_year'], 'x_card_code' => $HTTP_POST_VARS['cc_cvc_nh-dns'] ); if (is_numeric($sendto) && ($sendto > 0)) { $params['x_ship_to_first_name'] = substr($order->delivery['firstname'], 0, 50); $params['x_ship_to_last_name'] = substr($order->delivery['lastname'], 0, 50); $params['x_ship_to_company'] = substr($order->delivery['company'], 0, 50); $params['x_ship_to_address'] = substr($order->delivery['street_address'], 0, 60); $params['x_ship_to_city'] = substr($order->delivery['city'], 0, 40); $params['x_ship_to_state'] = substr($order->delivery['state'], 0, 40); $params['x_ship_to_zip'] = substr($order->delivery['postcode'], 0, 20); $params['x_ship_to_country'] = substr($order->delivery['country']['title'], 0, 60); } if (MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_MODE == 'Test') { $params['x_test_request'] = 'TRUE'; } $tax_value = 0; foreach ($order->info['tax_groups'] as $key => $value) { if ($value > 0) { $tax_value += $this->format_raw($value); } } if ($tax_value > 0) { $params['x_tax'] = $this->format_raw($tax_value); } $params['x_freight'] = $this->format_raw($order->info['shipping_cost']); $post_string = ''; foreach ($params as $key => $value) { $post_string .= $key . '=' . urlencode(trim($value)) . '&'; } $post_string = substr($post_string, 0, -1); for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { $post_string .= '&x_line_item=' . urlencode($i+1) . '<|>' . urlencode(substr($order->products[$i]['name'], 0, 31)) . '<|>' . urlencode(substr($order->products[$i]['name'], 0, 255)) . '<|>' . urlencode($order->products[$i]['qty']) . '<|>' . urlencode($this->format_raw($order->products[$i]['final_price'])) . '<|>' . urlencode($order->products[$i]['tax'] > 0 ? 'YES' : 'NO'); } switch (MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_SERVER) { case 'Live': $gateway_url = 'https://secure.authorize.net/gateway/transact.dll'; break; default: $gateway_url = 'https://test.authorize.net/gateway/transact.dll'; break; } $transaction_response = $this->sendTransactionToGateway($gateway_url, $post_string); if (!empty($transaction_response)) { $regs = preg_split("/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/", $transaction_response); foreach ($regs as $key => $value) { $regs[$key] = substr($value, 1, -1); // remove double quotes } } else { $regs = array('-1', '-1', '-1'); } $error = false; if ($regs[0] == '1') { if (tep_not_null(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_MD5_HASH)) { if (strtoupper($regs[37]) != strtoupper(md5(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_MD5_HASH . MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID . $regs[6] . $this->format_raw($order->info['total'])))) { $error = 'general'; } } } else { switch ($regs[2]) { case '7': $error = 'invalid_expiration_date'; break; case '8': $error = 'expired'; break; case '6': case '17': case '28': $error = 'declined'; break; case '78': $error = 'cvc'; break; default: $error = 'general'; break; } } if ($error != false) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error=' . $error, 'SSL')); } } function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_GENERAL; switch ($HTTP_GET_VARS['error']) { case 'invalid_expiration_date': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_INVALID_EXP_DATE; break; case 'expired': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_EXPIRED; break; case 'declined': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_DECLINED; break; case 'cvc': $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_CVC; break; default: $error_message = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_GENERAL; break; } $error = array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ERROR_TITLE, 'error' => $error_message); return $error; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Authorize.net Credit Card AIM', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_STATUS', 'False', 'Do you want to accept Authorize.net Credit Card AIM payments?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login ID', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID', '', 'The login ID used for the Authorize.net service', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Transaction Key', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY', '', 'Transaction key used for encrypting data', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('MD5 Hash', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_MD5_HASH', '', 'The MD5 hash value to verify transactions with', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Server', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_SERVER', 'Live', 'Perform transactions on the live or test server. The test server should only be used by developers with Authorize.net test accounts.', '6', '0', 'tep_cfg_select_option(array(\'Live\', \'Test\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_MODE', 'Live', 'Transaction mode used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Live\', \'Test\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Method', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_METHOD', 'Authorization', 'The processing method to use for each transaction.', '6', '0', 'tep_cfg_select_option(array(\'Authorization\', \'Capture\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('cURL Program Location', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CURL', '/usr/bin/curl', 'The location to the cURL program application.', '6', '0' , now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_AUTHORIZENET_CC_AIM_STATUS', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_MD5_HASH', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_SERVER', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_MODE', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_METHOD', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ZONE', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ORDER_STATUS_ID', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_SORT_ORDER', 'MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CURL'); } function _hmac($key, $data) { if (function_exists('mhash') && defined('MHASH_MD5')) { return bin2hex(mhash(MHASH_MD5, $data, $key)); } // RFC 2104 HMAC implementation for php. // Creates an md5 HMAC. // Eliminates the need to install mhash to compute a HMAC // Hacked by Lance Rushing $b = 64; // byte length for md5 if (strlen($key) > $B) { $key = pack("H*",md5($key)); } $key = str_pad($key, $b, chr(0x00)); $ipad = str_pad('', $b, chr(0x36)); $opad = str_pad('', $b, chr(0x5c)); $k_ipad = $key ^ $ipad ; $k_opad = $key ^ $opad; return md5($k_opad . pack("H*",md5($k_ipad . $data))); } function sendTransactionToGateway($url, $parameters) { $server = parse_url($url); if (isset($server['port']) === false) { $server['port'] = ($server['scheme'] == 'https') ? 443 : 80; } if (isset($server['path']) === false) { $server['path'] = '/'; } if (isset($server['user']) && isset($server['pass'])) { $header[] = 'Authorization: Basic ' . base64_encode($server['user'] . ':' . $server['pass']); } if (function_exists('curl_init')) { $curl = curl_init($server['scheme'] . '://' . $server['host'] . $server['path'] . (isset($server['query']) ? '?' . $server['query'] : '')); curl_setopt($curl, CURLOPT_PORT, $server['port']); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_FORBID_REUSE, 1); curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $parameters); $result = curl_exec($curl); curl_close($curl); } else { exec(escapeshellarg(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CURL) . ' -d ' . escapeshellarg($parameters) . ' "' . $server['scheme'] . '://' . $server['host'] . $server['path'] . (isset($server['query']) ? '?' . $server['query'] : '') . '" -P ' . $server['port'] . ' -k', $result); $result = implode("\n", $result); } return $result; } // format prices without currency formatting function format_raw($number, $currency_code = '', $currency_value = '') { global $currencies, $currency; if (empty($currency_code) || !$this->is_set($currency_code)) { $currency_code = $currency; } if (empty($currency_value) || !is_numeric($currency_value)) { $currency_value = $currencies->currencies[$currency_code]['value']; } return number_format(tep_round($number * $currency_value, $currencies->currencies[$currency_code]['decimal_places']), $currencies->currencies[$currency_code]['decimal_places'], '.', ''); } } ?>
  3. frohco

    One Page Checkout Support

    Got it to work! to fix Authorize.net Aim I simply added global $HTTP_POST_VARS; in the confirmation process. voila!
  4. frohco

    One Page Checkout Support

    sorry my confirmation() code actually looks like this ( I was trying some variations and that code had errors in it) $confirmation = array('fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('cc_number_nh-dns')), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_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_AUTHORIZENET_CC_AIM_CREDIT_CARD_CVC, 'field' => tep_draw_input_field('cc_cvc_nh-dns',"",'size="5" maxlength="4"')))); PayPal xpress handles ppecomments with global $comments and $ppecomments variable in confirmation(). It could work here. Also I don't know if its safe to use order->info('cc_number'); etc for info like the rest of the forms i.e. shipping and billing info.
  5. frohco

    One Page Checkout Support

    This is what my log looks like. notice x_card_num= but x_exp_date=012010; I Starred out my login and trankey. SENT: x_login=********&x_tran_key=****************&x_version=3.1&x_delim_data=TRUE&x_delim_char=%2C&x_encap_char=%22&x_relay_response=FALSE&x_first_name=Hugh&x_last_name=Jackson&x_company=&x_address=69+magoo+dr&x_city=Irvine&x_state=California&x_zip=90210&x_country=United+States&x_phone=555+666-7777&x_cust_id=5&x_customer_ip=24.60.98.47&x_email=XXXXXX%40gmail.com&x_description=Froh+Safety&x_amount=7.94&x_currency_code=USD&x_method=CC&x_type=AUTH_CAPTURE&x_card_num=&x_exp_date=012010&x_card_code=&x_ship_to_first_name=Hugh&x_ship_to_last_name=Jackson&x_ship_to_company=&x_ship_to_address=69+magoo+dr&x_ship_to_city=Irvine&x_ship_to_state=California&x_ship_to_zip=90210&x_ship_to_country=United+States&x_freight=4.95&x_line_item=1<|>Nuisance+Dust+Mask+%285%29<|>Nuisance+Dust+Mask+%285%29<|>1<|>2.99<|>NO RESPONSE: "3","2","33","Credit card number is required.","","P","0","","Froh Safety","7.94","CC","auth_capture","5","Hugh","Jackson","","69 magoo dr","Irvine","California","90210","United States","555 666-7777","","XXXXXX@gmail.com","Hugh","Jackson","","69 magoo dr","Irvine","California","90210","United States","","","4.95","","","882B2D9433808FBD00DA0BBC8F8450FX","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","" POST: action=process POST: 142=1 POST: billing_firstname=Hugh POST: billing_lastname=Jackson POST: billing_country=223 POST: billing_street_address=69 magoo dr POST: billing_city=Irvine POST: billing_state=California POST: billing_zipcode=90210 POST: shipping_firstname=Hugh POST: shipping_lastname=Jackson POST: shipping_country=223 POST: shipping_street_address=69 magoo dr POST: shipping_city=Irvine POST: delivery_state=California POST: shipping_zipcode=90210 POST: payment=authorizenet_cc_aim POST: cc_owner=Hugh Jackson POST: cc_number_nh-dns= POST: cc_expires_month=01 POST: cc_expires_year=2010 POST: cc_cvc_nh-dns= POST: cc_type=VISA POST: cc_starts_month=01 POST: cc_starts_year=2000 POST: cc_issue_nh-dns= POST: ppecomments= POST: shipping=table_table POST: comments= POST: x=74 POST: y=12 POST: formUrl= Done. but If i disable OPC. SENT: x_login=********&x_tran_key=****************&x_version=3.1&x_delim_data=TRUE&x_delim_char=%2C&x_encap_char=%22&x_relay_response=FALSE&x_first_name=Hugh&x_last_name=Jackson&x_company=&x_address=69+magoo+dr&x_city=Irvine&x_state=CA&x_zip=90210&x_country=United+States&x_phone=555+666-7777&x_cust_id=5&x_customer_ip=24.60.98.47&x_email=XXXXXX%40gmail.com&x_description=Froh+Safety&x_amount=7.94&x_currency_code=USD&x_method=CC&x_type=AUTH_CAPTURE&x_card_num=4111111111111111&x_exp_date=0113&x_card_code=999&x_ship_to_first_name=Hugh&x_ship_to_last_name=Jackson&x_ship_to_company=&x_ship_to_address=69+magoo+dr&x_ship_to_city=Irvine&x_ship_to_state=CA&x_ship_to_zip=90210&x_ship_to_country=United+States&x_freight=4.95&x_line_item=1<|>Nuisance+Dust+Mask+%285%29<|>Nuisance+Dust+Mask+%285%29<|>1<|>2.99<|>NO RESPONSE: "2","2","205","This transaction has been declined","","P","3201285938","","Froh Safety","7.94","CC","auth_capture","5","Hugh","Jackson","","69 magoo dr","Irvine","CA","90210","United States","555 666-7777","","XXXXXX@gmail.com","Hugh","Jackson","","69 magoo dr","Irvine","CA","90210","United States","","","4.95","","","3B8645A983B7A7A775CF177DEC03B130","","","","","","","","","","","","","XXXX1111","Visa","","","","","","","","","","","","","","","","" POST: cc_owner=Hugh Jackson POST: cc_number_nh-dns=4111111111111111 POST: cc_expires_month=01 POST: cc_expires_year=13 POST: cc_cvc_nh-dns=999 POST: x=46 POST: y=10 Done.
  6. frohco

    One Page Checkout Support

    Thank you for the response. I am running $Id: authorizenet_cc_aim.php 1803 2008-01-11 18:16:37Z hpdl $ and have tried other versions. The problem is in the confirmation and before_process in the code. When authorize is selected i get my form boxes with default values when confirmation() is called, but no matter what I type in only the defaults are passed on through post. With opc disabled my authorize.net module works fine so i know those setting are correct. I've narrowed it down to here: $confirmation = array('fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('cc_number_nh-dns'), array('title' => MODULE_PAYMENT_AUTHORIZENET_CC_AIM_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_AUTHORIZENET_CC_AIM_CREDIT_CARD_CVC, 'field' => tep_draw_input_field('cc_cvc_nh-dns','size="5" maxlength="4"')))); return $confirmation; } and Here. function before_process() { global $HTTP_POST_VARS, $customer_id, $order, $sendto, $currency; $params = array('x_login' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID, 0, 20), 'x_tran_key' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY, 0, 16), 'x_version' => '3.1', 'x_delim_data' => 'TRUE', 'x_delim_char' => ',', 'x_encap_char' => '"', 'x_relay_response' => 'FALSE', 'x_first_name' => substr($order->billing['firstname'], 0, 50), 'x_last_name' => substr($order->billing['lastname'], 0, 50), 'x_company' => substr($order->billing['company'], 0, 50), 'x_address' => substr($order->billing['street_address'], 0, 60), 'x_city' => substr($order->billing['city'], 0, 40), 'x_state' => substr($order->billing['state'], 0, 40), 'x_zip' => substr($order->billing['postcode'], 0, 20), 'x_country' => substr($order->billing['country']['title'], 0, 60), 'x_phone' => substr($order->customer['telephone'], 0, 25), 'x_cust_id' => substr($customer_id, 0, 20), 'x_customer_ip' => tep_get_ip_address(), 'x_email' => substr($order->customer['email_address'], 0, 255), 'x_description' => substr(STORE_NAME, 0, 255), 'x_amount' => substr($this->format_raw($order->info['total']), 0, 15), 'x_currency_code' => substr($currency, 0, 3), 'x_method' => 'CC', 'x_type' => ((MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_METHOD == 'Capture') ? 'AUTH_CAPTURE' : 'AUTH_ONLY'), 'x_card_num' => $HTTP_POST_VARS['cc_number_nh-dns'], 'x_exp_date' => $HTTP_POST_VARS['cc_expires_month'] . $HTTP_POST_VARS['cc_expires_year'], 'x_card_code' => $HTTP_POST_VARS['cc_cvc_nh-dns'] ); The problem is x_card_num, x_exp_date, x_card_code dont get updated. -This happens on all browsers(firefox, chrome, and ie8) I Am a freelance php coder but I'm also a business owner. The faster I can solve this the better. If I can find a decent Code Guru I can trust I will hire him, but It looks like this could be a good official bug fix for this great contribution as Authorize AIM module is pretty widely used. I will keep working on it. Thanx!..
  7. frohco

    One Page Checkout Support

    I have gone through most of these 94 pages and still can't find a solution to implementing authorize.net aim. I have been diagnosing problem and it seems that it simply does not pass credit card form information for output.. Your cc.php code placed earlier does the same thing. Has anyone found a way to get the form to post properly? I have a live site with one page checkout enabled.. but currently only accept paypal xpress and google. I can literally watch customers fill their cart then abandon it at checkout.php. Any help would be appreciated! Thanx!
×