you should be using:
domainname.com/checkout_success.php
for the success redirect.
the shopping cart empty is being caused by domain switching between using the www address and returning to the none www address. In order words, you are adding the items to the cart using:
www.domainname.com/products.php
and then returning to the non www address:
domainname.com/checkout_success.php
this is a different browsing session. to prevent this you can use mod rewrite and hataccess to force the www address, see the following page for details:
http://www.htaccessbasics.com/force-www-nonwww-domain/