Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error connecting to authorize.net

Status
Not open for further replies.

bbsemail

MIS
Oct 29, 2003
6
US
I set up oscommerce but have one question and one huge problem:

Problem
When a user clicks checkout and gets to the checkout_confirmation.php file the following error is thrown when Confirm Order is clicked:

The referrer, relay response or receipt link URL is invalid

What do I have set up incorrectly? It must be related to my configuration/misconfig of the payment module, but I don't see how to fix it. I set up processing to go through authorize.net. This is prohibiting me from launching the store for this charity, so any help would be greatly appreciated. I did not configure authorize.net to use relay response.

Question
I configured sales tax for California and oscommerce displays sales tax in the checkout_confirmation.php screen, but there is no title, just a : followed by the tax amount. The variable, heading_tax appears to hold this text, how do I set it? In the Languages/English folder, this variable appears to be set to Tax in the checkout_confirmation.php file.

Again, thank you
 
Thanks for the help; sorry about leaving out details. I use the SIM method for other secure transactions and I am trying to implement it with oscommerce as well; can I or can I config authorize.net to use different methods with different scripts?. The variable $HEADING_TAX const appears to be the problem with presenting the caption Tax: on the screen, but even if I try hard coding Tax: in that location instead of the variable, the screen displays only the : (colon)

I'm not sure aboout the variable $heading_tax; I don't see it in the script. Perhaps this is a no-no, but here's the script:

<?php
/*
$Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}

// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}

// avoid hack attempts during the checkout procedure by checking the internal cartID
if (isset($cart->cartID) && tep_session_is_registered('cartID')) {
if ($cart->cartID != $cartID) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}
}

// if no shipping method has been selected, redirect the customer to the shipping method selection page
if (!tep_session_is_registered('shipping')) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
}

if (!tep_session_is_registered('payment')) tep_session_register('payment');
if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];

if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}

// load the selected payment module
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment($payment);

require(DIR_WS_CLASSES . 'order.php');
$order = new order;

$payment_modules->update_status();

if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
}

if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}

// load the selected shipping module
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);

require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

// Stock Check
$any_out_of_stock = false;
if (STOCK_CHECK == 'true') {
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
$any_out_of_stock = true;
}
}
// Out of Stock
if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
}

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION);

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
?>
<!doctype html public &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=<?php echo CHARSET; ?>&quot;>
<title>Horseless Carriage Club, Order Confirmation</title>
<base href=&quot;<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>&quot;>
<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;stylesheet.css&quot;>
</head>
<body marginwidth=&quot;0&quot; marginheight=&quot;0&quot; topmargin=&quot;0&quot; bottommargin=&quot;0&quot; leftmargin=&quot;0&quot; rightmargin=&quot;0&quot;>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;3&quot; cellpadding=&quot;3&quot;>
<tr>
<td width=&quot;230&quot; valign=&quot;top&quot;><table border=&quot;0&quot; width=&quot;230&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width=&quot;100%&quot; valign=&quot;top&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td class=&quot;pageHeading&quot;><?php echo HEADING_TITLE; ?></td>
<td class=&quot;pageHeading&quot; align=&quot;right&quot;><?php echo tep_image(DIR_WS_IMAGES . 'table_background_confirmation.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot; class=&quot;infoBox&quot;>
<tr class=&quot;infoBoxContents&quot;>
<?php
if ($sendto != false) {
?>
<td width=&quot;30%&quot; valign=&quot;top&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<tr>
<td class=&quot;main&quot;><?php echo '<b>' . HEADING_DELIVERY_ADDRESS . '</b> <a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>
</tr>
<?php
if ($order->info['shipping_method']) {
?>
<tr>
<td class=&quot;main&quot;><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><?php echo $order->info['shipping_method']; ?></td>
</tr>
<?php
}
?>
</table></td>
<?php
}
?>
<td width=&quot;<?php echo (($sendto != false) ? '70%' : '100%'); ?>&quot; valign=&quot;top&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<?php
if (sizeof($order->info['tax_groups']) > 1) {
?>
<tr>
<td class=&quot;main&quot; colspan=&quot;2&quot;><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href=&quot;' . tep_href_link(FILENAME_SHOPPING_CART) . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
<td class=&quot;smallText&quot; align=&quot;right&quot;><b>Tax: <b></td>
<td class=&quot;smallText&quot; align=&quot;right&quot;><b><?php echo HEADING_TOTAL; ?></b></td>
</tr>
<?php
} else {
?>
<tr>
<td class=&quot;main&quot; colspan=&quot;3&quot;><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href=&quot;' . tep_href_link(FILENAME_SHOPPING_CART) . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<?php
}

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <tr>' . &quot;\n&quot; .
' <td class=&quot;main&quot; align=&quot;right&quot; valign=&quot;top&quot; width=&quot;30&quot;>' . $order->products[$i]['qty'] . '&nbsp;x</td>' . &quot;\n&quot; .
' <td class=&quot;main&quot; valign=&quot;top&quot;>' . $order->products[$i]['name'];

if (STOCK_CHECK == 'true') {
echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);
}

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
}
}

echo '</td>' . &quot;\n&quot;;

if (sizeof($order->info['tax_groups']) > 1) echo ' <td class=&quot;main&quot; valign=&quot;top&quot; align=&quot;right&quot;>' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . &quot;\n&quot;;

echo ' <td class=&quot;main&quot; align=&quot;right&quot; valign=&quot;top&quot;>' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . &quot;\n&quot; .
' </tr>' . &quot;\n&quot;;
}
?>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot; class=&quot;infoBox&quot;>
<tr class=&quot;infoBoxContents&quot;>
<td width=&quot;30%&quot; valign=&quot;top&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<tr>
<td class=&quot;main&quot;><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><?php echo $order->info['payment_method']; ?></td>
</tr>
</table></td>
<td width=&quot;70%&quot; valign=&quot;top&quot; align=&quot;right&quot;><table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<?php
if (MODULE_ORDER_TOTAL_INSTALLED) {
$order_total_modules->process();
echo $order_total_modules->output();
}
?>
</table></td>
</tr>
</table></td>
</tr>
<?php
if (is_array($payment_modules->modules)) {
if ($confirmation = $payment_modules->confirmation()) {
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class=&quot;main&quot;><b><?php echo HEADING_PAYMENT_INFORMATION; ?></b></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot; class=&quot;infoBox&quot;>
<tr class=&quot;infoBoxContents&quot;>
<td><table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<tr>
<td class=&quot;main&quot; colspan=&quot;4&quot;><?php echo $confirmation['title']; ?></td>
</tr>
<?php
for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
?>
<tr>
<td width=&quot;10&quot;><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class=&quot;main&quot;><?php echo $confirmation['fields'][$i]['title']; ?></td>
<td width=&quot;10&quot;><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class=&quot;main&quot;><?php echo $confirmation['fields'][$i]['field']; ?></td>
</tr>
<?php
}
?>
</table></td>
</tr>
</table></td>
</tr>
<?php
}
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
if (tep_not_null($order->info['comments'])) {
?>
<tr>
<td class=&quot;main&quot;><?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '&quot;><span class=&quot;orderEdit&quot;>(' . TEXT_EDIT . ')</span></a>'; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;2&quot; class=&quot;infoBox&quot;>
<tr class=&quot;infoBoxContents&quot;>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<tr>
<td class=&quot;main&quot;><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
?>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;right&quot; class=&quot;main&quot;>
<?php
if (isset($$payment->form_action_url)) {
$form_action_url = $$payment->form_action_url;
} else {
$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
}

echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
}

echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . &quot;\n&quot;;
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;25%&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;50%&quot; align=&quot;right&quot;><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
<td width=&quot;50%&quot;><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
</tr>
</table></td>
<td width=&quot;25%&quot;><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
<td width=&quot;25%&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;50%&quot;><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
<td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
<td width=&quot;50%&quot;><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
</tr>
</table></td>
<td width=&quot;25%&quot;><table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;50%&quot;><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
<td width=&quot;50%&quot;><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
</tr>
</table></td>
</tr>
<tr>
<td align=&quot;center&quot; width=&quot;25%&quot; class=&quot;checkoutBarFrom&quot;><?php echo '<a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '&quot; class=&quot;checkoutBarFrom&quot;>' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
<td align=&quot;center&quot; width=&quot;25%&quot; class=&quot;checkoutBarFrom&quot;><?php echo '<a href=&quot;' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '&quot; class=&quot;checkoutBarFrom&quot;>' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td>
<td align=&quot;center&quot; width=&quot;25%&quot; class=&quot;checkoutBarCurrent&quot;><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
<td align=&quot;center&quot; width=&quot;25%&quot; class=&quot;checkoutBarTo&quot;><?php echo CHECKOUT_BAR_FINISHED; ?></td>
</tr>
</table></td>
</tr>
</table></td>
<!-- body_text_eof //-->
<td width=&quot;<?php echo BOX_WIDTH; ?>&quot; valign=&quot;top&quot;><table border=&quot;0&quot; width=&quot;<?php echo BOX_WIDTH; ?>&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;>
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Perhaps I should have inserted just the applicable blocks, but this is the complete picture.Thanks for any assistance.

brad
 
Should I try deleting all of my sales tax settings and starting over? I don't see how that will help, but I would like the words Sales Tax to appear before the :

Again. thanks for any assistance.

brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top