The code hmpierson posted is a step in the right direction, but has some code errors. Here’s what we use in EE 1.11, and should work in CE 1.6 or 1.7, although we didn’t test it in CE.
$order_id = $this->getOrderId();
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
$order_email = $order->getCustomerEmail();
<link rel="stylesheet" href="https://www.resellerratings.com/images/js/dhtml_survey.css" type="text/css" />
seller_id = "XXXXX";
__rr_inv = "<?php echo $order_id; ?>";
__rr_email_pass = "<?php echo $order_email; ?>";
You can remove the comments in front of the echos to test that the order id and email are being retrieved, you should see them echoed at the bottom of the success page.
Put this code at the very bottom of success.phtml after:
<button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="[removed]='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
and you should be good to go, of course you have to use your own seller_id and not XXXXX.