on the confirm page, the following form element sends the cart to paypal:
<form name="checkout_PP_LI_Hid" action="https://www.PayPal.com/cgi-bin/webscr" method="post">
use an if statement to set the action to post to the success page if the cart total cost is 0:
<?php if($yourCartName->GrandTotal() > 0) { ?>
<form name="checkout_PP_LI_Hid" action="https://www.PayPal.com/cgi-bin/webscr" method="post">
<?php } else { ?>
<form name="checkout_PP_LI_Hid" action="checkout_success.php" method="post">
<?php } ?>
where yourCartName is the name of your cart object.