you can customize the link that points back to your home page by modifying the form on the confirm page that sends the trasnsaction to authorize.net.
if the following elements arent there already, add them:
<input type="hidden" name="x_receipt_link_method" value="link">
<input type="hidden" name="x_receipt_link_text" value="return to our online store">
<input type="hidden" name="x_receipt_link_url" value="http://www.mydomain.com/index.php?cart=clear">
male sure to add:
/index.php?cart=clear
to the link url, this can be used to tell it to clear the cart by using the following code on the index.php page:
<?php
if(isset($_GET['cart']) && $_GET['cart'] == "clear"){
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
@setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
// Finally, destroy the session.
@session_destroy();
session_regenerate_id();
@session_start();
}
?>