♥akmac Posted February 15, 2005 Share Posted February 15, 2005 I've got a weird problem. When I clicked "confirm order" (on my test site) I got sent back to the "payment Information" page with no visible error. I was confused by this for awhile, but then copied the url as it was redirecting me. It read something like: myurl+your+shipping+information+does+not+match+the+credit+card+information+you+s upplied In short, it listed the error message in the url. Is this a syntax error in the payment module? I'm using the trustcommerce module for payment. Anyways, I disabled AVS for the module and it works fine now-but I'd like to be able to use AVS and have an error message display where the customer can see it instead of in the URL. Anyone had this issue or know a fix? Quidquid latine dictum sit, profundum viditur. Link to comment Share on other sites More sharing options...
WebPixie Posted February 17, 2005 Share Posted February 17, 2005 I've got a weird problem. When I clicked "confirm order" (on my test site) I got sent back to the "payment Information" page with no visible error. I was confused by this for awhile, but then copied the url as it was redirecting me. It read something like: myurl+your+shipping+information+does+not+match+the+credit+card+information+you+s upplied In short, it listed the error message in the url. Is this a syntax error in the payment module? I'm using the trustcommerce module for payment. Anyways, I disabled AVS for the module and it works fine now-but I'd like to be able to use AVS and have an error message display where the customer can see it instead of in the URL. Anyone had this issue or know a fix? <{POST_SNAPBACK}> I'm using USAepay module and the same thing is happening. checkout_payment.php?error_message=Your+card+has+been+declined.++Please+choose+another+form+of+payment. Maybe the cc_verify function is not picking up the errors? It should pass that variable from the url to the page but it's not :( Any find a solution? Link to comment Share on other sites More sharing options...
WebPixie Posted February 21, 2005 Share Posted February 21, 2005 I'm using USAepay module and the same thing is happening. Maybe the cc_verify function is not picking up the errors? It should pass that variable from the url to the page but it's not :( Any find a solution? <{POST_SNAPBACK}> akmac, What does your url look like exactly? http://www.yourdomain.com/checkout_payment...credit+card..... I think I have this figured out, but I want to be sure. I have my errors showing up perfectly on the page now, but before I post it want to be sure it's the same problem. Are you using the template system? In the URL above what is your "something" is it "error_message"? Link to comment Share on other sites More sharing options...
♥akmac Posted February 22, 2005 Author Share Posted February 22, 2005 akmac, What does your url look like exactly? https://host262.ipowerweb.com/~mysite/check...b1d355fd0694540 Is this the error you got? I appreciate your reply Webpixie. Quidquid latine dictum sit, profundum viditur. Link to comment Share on other sites More sharing options...
WebPixie Posted February 25, 2005 Share Posted February 25, 2005 akmac, What does your url look like exactly? https://host262.ipowerweb.com/~mysite/check...b1d355fd0694540 Is this the error you got? I appreciate your reply Webpixie. <{POST_SNAPBACK}> Basicly with STS installed the error_message= part was not working from the header, so I went into my payment module, in my case includes/modules/payment/usaepay.php, and changed this: 'error_message=' to this: 'payment_error=' . $this->code . '&error=' Then it shows the error message in the middle of the page instead of the top header which is better anyways as well :) Let me know how it works for you.... Link to comment Share on other sites More sharing options...
♥akmac Posted February 25, 2005 Author Share Posted February 25, 2005 This is how the code reads in my module: ----------------------------------------------- if ( ($result == false) || ($result < 1) ) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&trustcommerce_cc_owner=' . urlencode($HTTP_POST_VARS['trustcommerce_cc_owner']) . '&trustcommerce_cc_expires_month=' . $HTTP_POST_VARS['trustcommerce_cc_expires_month'] . '&trustcommerce_cc_expires_year=' . $HTTP_POST_VARS['trustcommerce_cc_expires_year']; ----------------------------------------------- The first bit looks like what you added already-what do I edit in the second bit? Sorry I'm a total php newbie... Quidquid latine dictum sit, profundum viditur. Link to comment Share on other sites More sharing options...
WebPixie Posted February 26, 2005 Share Posted February 26, 2005 This is how the code reads in my module:----------------------------------------------- if ( ($result == false) || ($result < 1) ) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&trustcommerce_cc_owner=' . urlencode($HTTP_POST_VARS['trustcommerce_cc_owner']) . '&trustcommerce_cc_expires_month=' . $HTTP_POST_VARS['trustcommerce_cc_expires_month'] . '&trustcommerce_cc_expires_year=' . $HTTP_POST_VARS['trustcommerce_cc_expires_year']; ----------------------------------------------- The first bit looks like what you added already-what do I edit in the second bit? Sorry I'm a total php newbie... <{POST_SNAPBACK}> Look down further in the code for something like this: case 'Declined' : and case 'Error' : Or post your payment mod and I will show you. Link to comment Share on other sites More sharing options...
♥akmac Posted February 26, 2005 Author Share Posted February 26, 2005 Here's the whole thing-my apologies-it's huge: ----------------------------------------------------- <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License This payment module requires the TCLink PHP client installed as root and enabled as an Apache extension. Downloads and documentation are available at: http://trustcommerce.com/tclink.html If the TCLink module cannot be installed, Curl can also be used if installed on the PHP webserver. TrustCommerce Payment Module v1.1.4 http://www.oscommerce.com/community/contributions,127 */ class trustcommerce { var $code, $title, $description, $enabled; //// // !Class constructor -> initialize class variables. // Sets the class code, description, and status. function trustcommerce() { global $order; $this->code = 'trustcommerce'; $this->title = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_TITLE; $this->description = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_TRUSTCOMMERCE_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_TRUSTCOMMERCE_STATUS == 'True') ? true : false); if ((int)MODULE_PAYMENT_TRUSTCOMMERCE_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_TRUSTCOMMERCE_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); } //// // !Update the module status dynamically function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_TRUSTCOMMERCE_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_TRUSTCOMMERCE_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; } } } //// // !Javascript form validation // Check the user input submited on checkout_payment.php with javascript (client-side). function javascript_validation() { $js = ' if (payment_value == "' . $this->code . '") {' . "\n" . ' var cc_owner = document.checkout_payment.trustcommerce_cc_owner.value;' . "\n" . ' var cc_number = document.checkout_payment.trustcommerce_cc_number.value;' . "\n" . ' if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_JS_CC_OWNER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" . ' error_message = error_message + "' . MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_JS_CC_NUMBER . '";' . "\n" . ' error = 1;' . "\n" . ' }' . "\n" . ' }' . "\n"; return $js; } //// // !Form fields for user input // Output any required information in form fields 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))); } $selection = array('id' => $this->code, 'module' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_OWNER, 'field' => tep_draw_input_field('trustcommerce_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])), array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_NUMBER, 'field' => tep_draw_input_field('trustcommerce_cc_number')))); if (MODULE_PAYMENT_TRUSTCOMMERCE_CVV == 'True') { $selection['fields'][] = array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_CVV, 'field' => tep_draw_input_field('trustcommerce_cc_cvv', '', 'size="3" maxlength="3"')); } $selection['fields'][] = array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_EXPIRES, 'field' => tep_draw_pull_down_menu('trustcommerce_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('trustcommerce_cc_expires_year', $expires_year)); return $selection; } //// // Pre confirmation checks (ie, check if credit card information is right before sending the info to // the payment server function pre_confirmation_check() { global $HTTP_POST_VARS; include(DIR_WS_CLASSES . 'cc_validation.php'); $cc_validation = new cc_validation(); $result = $cc_validation->validate($HTTP_POST_VARS['trustcommerce_cc_number'], $HTTP_POST_VARS['trustcommerce_cc_expires_month'], $HTTP_POST_VARS['trustcommerce_cc_expires_year']); $error = ''; switch ($result) { case -1: $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4)); break; case -2: case -3: case -4: $error = TEXT_CCVAL_ERROR_INVALID_DATE; break; case false: $error = TEXT_CCVAL_ERROR_INVALID_NUMBER; break; } if ( ($result == false) || ($result < 1) ) { $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&trustcommerce_cc_owner=' . urlencode($HTTP_POST_VARS['trustcommerce_cc_owner']) . '&trustcommerce_cc_expires_month=' . $HTTP_POST_VARS['trustcommerce_cc_expires_month'] . '&trustcommerce_cc_expires_year=' . $HTTP_POST_VARS['trustcommerce_cc_expires_year']; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false)); } $this->cc_card_type = $cc_validation->cc_type; $this->cc_card_number = $cc_validation->cc_number; $this->cc_expiry_month = $cc_validation->cc_expiry_month; $this->cc_expiry_year = $cc_validation->cc_expiry_year; } //// // !Functions to execute before displaying the checkout confirmation page function confirmation() { global $HTTP_POST_VARS; $confirmation = array('title' => $this->title . ': ' . $this->cc_card_type, 'fields' => array(array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_OWNER, 'field' => $HTTP_POST_VARS['trustcommerce_cc_owner']), array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_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)))); if (MODULE_PAYMENT_TRUSTCOMMERCE_CVV == 'True') { $confirmation['fields'][] = array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_CVV, 'field' => $HTTP_POST_VARS['trustcommerce_cc_cvv']); } $confirmation['fields'][] = array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_CREDIT_CARD_EXPIRES, 'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['trustcommerce_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['trustcommerce_cc_expires_year']))); return $confirmation; } //// // !Functions to execute before finishing the form // Store all the relevant order information into hidden fields for the // before_process() function to use function process_button() { $process_button_string = tep_draw_hidden_field('cc', $this->cc_card_number) . tep_draw_hidden_field('exp', $this->cc_expiry_month . substr($this->cc_expiry_year, -2)); if (MODULE_PAYMENT_TRUSTCOMMERCE_CVV == 'True') { $process_button_string .= tep_draw_hidden_field('cvv', $HTTP_POST_VARS['trustcommerce_cc_cvv']); } return $process_button_string; } //// // !Functions to execute before processing the order // Actually interface with the TCLink module here. Note that the osCommerce // $customer_id is completely different than the TrustCommerce custid login function before_process() { if (MODULE_PAYMENT_TRUSTCOMMERCE_TRANSACTION_MODE == 'TCLink') { // load the tclink module if (!extension_loaded('tclink')) dl('tclink.so'); $result = $this->_parse_result($this->_connect_tclink()); } else { $result = $this->_parse_result($this->_connect_curl()); } if ($result[0] == 'error') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($result[1]), 'SSL', true, false)); } } //// // !Functions to execute after processing the order function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; $error = array('title' => MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR, 'error' => stripslashes(urldecode($HTTP_GET_VARS['error']))); return $error; } //// // !Check if module is installed (Administration Tool)_ // TABLES: configuration function check() { if (!isset($this->check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_TRUSTCOMMERCE_STATUS'"); $this->check = tep_db_num_rows($check_query); } return $this->check; } //// // !Install the module (Administration Tool)_ // TABLES: configuration 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 TrustCommerce Module', 'MODULE_PAYMENT_TRUSTCOMMERCE_STATUS', 'True', 'Do you want to accept TrustCommerce 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 ('Customer ID', 'MODULE_PAYMENT_TRUSTCOMMERCE_CUSTID', '', 'Customer ID used for TrustCommerce payments', '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 ('Password', 'MODULE_PAYMENT_TRUSTCOMMERCE_PASSWORD', '', 'Customer password used for TrustCommerce payments', '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 Mode', 'MODULE_PAYMENT_TRUSTCOMMERCE_TRANSACTION_MODE', 'TCLink', 'Use the TCLlink module for transactions, or a secure Curl connection', '6', '0', 'tep_cfg_select_option(array(\'TCLink\', \'Curl\'), ', 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 ('Demo Mode', 'MODULE_PAYMENT_TRUSTCOMMERCE_DEMOMODE', 'Test', 'Whether transactions are testing or live', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'Live\'), ', 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 ('Action Mode', 'MODULE_PAYMENT_TRUSTCOMMERCE_ACTION', 'preauth', 'Transaction charge type', '6', '0', 'tep_cfg_select_option(array(\'preauth\', \'sale\'), ', 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 ('AVS Mode', 'MODULE_PAYMENT_TRUSTCOMMERCE_AVS', 'False', 'Whether address verification is enabled', '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, set_function, date_added) values ('Display CVV Field', 'MODULE_PAYMENT_TRUSTCOMMERCE_CVV', 'True', 'Display the CVV field (input is optional)', '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 ('Sort Order', 'MODULE_PAYMENT_TRUSTCOMMERCE_SORT_ORDER', '0', 'Sort order of display', '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_TRUSTCOMMERCE_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '0', '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_TRUSTCOMMERCE_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())"); } //// // !Remove the module (Administration Tool)_ // TABLES: configuration function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } //// // !Retreive the modules configuration keys (Administration Tool)_ function keys() { return array('MODULE_PAYMENT_TRUSTCOMMERCE_STATUS', 'MODULE_PAYMENT_TRUSTCOMMERCE_CUSTID', 'MODULE_PAYMENT_TRUSTCOMMERCE_PASSWORD', 'MODULE_PAYMENT_TRUSTCOMMERCE_TRANSACTION_MODE', 'MODULE_PAYMENT_TRUSTCOMMERCE_DEMOMODE', 'MODULE_PAYMENT_TRUSTCOMMERCE_ACTION', 'MODULE_PAYMENT_TRUSTCOMMERCE_AVS', 'MODULE_PAYMENT_TRUSTCOMMERCE_CVV', 'MODULE_PAYMENT_TRUSTCOMMERCE_SORT_ORDER', 'MODULE_PAYMENT_TRUSTCOMMERCE_ZONE', 'MODULE_PAYMENT_TRUSTCOMMERCE_ORDER_STATUS_ID'); } function _send_parameters() { global $HTTP_POST_VARS, $order; $customer_zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->customer['state'] . "'"); $customer_zone = tep_db_fetch_array($customer_zone_query); $delivery_zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'"); $delivery_zone = tep_db_fetch_array($delivery_zone_query); $amount = number_format($order->info['total'], 2); $amount = preg_replace('/\D/', '', $amount); $params = array('custid' => MODULE_PAYMENT_TRUSTCOMMERCE_CUSTID, 'password' => MODULE_PAYMENT_TRUSTCOMMERCE_PASSWORD, 'cc' => $HTTP_POST_VARS['cc'], 'exp' => $HTTP_POST_VARS['exp'], 'amount' => $amount, 'action' => MODULE_PAYMENT_TRUSTCOMMERCE_ACTION, 'name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'], 'address1' => $order->customer['street_address'], 'city' => $order->customer['city'], 'state' => $customer_zone['zone_code'], 'zip' => $order->customer['postcode'], 'country' => $order->customer['country']['title'], 'phone' => $order->customer['telephone'], 'email' => $order->customer['email_address'], 'shipto_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 'shipto_address1' => $order->delivery['street_address'], 'shipto_city' => $order->delivery['city'], 'shipto_state' => $delivery_zone['zone_code'], 'shipto_zip' => $order->delivery['postcode'], 'shipto_country' => $order->delivery['country']['title'], 'avs' => ((MODULE_PAYMENT_TRUSTCOMMERCE_AVS == 'True') ? 'y' : 'n'), 'demo' => ((MODULE_PAYMENT_TRUSTCOMMERCE_DEMOMODE == 'Test') ? 'y' : 'n')); if (MODULE_PAYMENT_TRUSTCOMMERCE_CVV == 'True') { $params['cvv'] = $HTTP_POST_VARS['cvv']; } return $params; } function _connect_curl() { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://vault.trustcommerce.com/trans/'); curl_setopt($curl, CURLOPT_FAILONERROR, 1); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 3); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POST, 1); $params = $this->_send_parameters(); $params_string = ''; foreach ($params as $key => $value) { if (tep_not_null($value)) { $params_string .= $key . '=' . urlencode($value) . '&'; } } $params_string = substr($params_string, 0, -1); curl_setopt($curl, CURLOPT_POSTFIELDS, $params_string); $curl_result = curl_exec($curl); $curl_result = explode("\n", $curl_result); $result = array(); for ($i=0, $n=sizeof($curl_result); $i<$n; $i++) { if (tep_not_null($curl_result[$i])) { list($key, $value) = explode('=', $curl_result[$i]); $result[$key] = $value; } } curl_close($curl); return $result; } function _connect_tclink() { $params = $this->_send_parameters(); foreach ($params as $key => $value) { if (empty($value)) { unset($params[$key]); } } return tclink_send($params); } function _parse_result($result) { if ($result['status'] == 'decline') { switch ($result['declinetype']) { case 'decline': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_DECLINE; break; case 'avs': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_AVS; if (tep_not_null($result['avs']) && defined('MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_AVS' . $result['avs'])) { $error = constant('MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_AVS' . $result['avs']); } break; case 'cvv': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_CVV; break; case 'call': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_CALL; break; case 'authexpired': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_AUTHEXPIRED; break; case 'carderror': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_CARDERROR; break; case 'dailylimit': case 'weeklylimit': case 'monthlylimit': $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_LIMIT; break; default: $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_MESSAGE; break; } } elseif ($result['status'] == 'baddata') { $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_BADDATA; } elseif ($result['status'] != 'approved') { $error = MODULE_PAYMENT_TRUSTCOMMERCE_TEXT_ERROR_MESSAGE; } if (isset($error)) { return array('error', $error); } else { return array('success'); } } } ?> ----------------------------------------------------------------------- Quidquid latine dictum sit, profundum viditur. Link to comment Share on other sites More sharing options...
WebPixie Posted February 27, 2005 Share Posted February 27, 2005 Like I said, just do a search for 'error_message=' in the file and change it. I did a search for error_message= on the post and this is found: if ($result[0] == 'error') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($result[1]), 'SSL', true, false)); } } change it to this: if ($result[0] == 'error') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error=' . urlencode($result[1]), 'SSL', true, false)); } } Just for the future, do a search in the file first to make sure it's not there, will save you a lot of time waiting for replys on the boards :) Let me know how it works for you. Link to comment Share on other sites More sharing options...
♥akmac Posted March 1, 2005 Author Share Posted March 1, 2005 Perfect! thanks webpixie. I did do a search but got seven error_message(s). Appreciate your help very much. Quidquid latine dictum sit, profundum viditur. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.