The page here has a solution however it doesn’t work : http://wpquestions.com/question/show/id/1840 and the topic is closed hence for this post!
You need to edit this file : wpsc-transaction_results.php
I placed my code after the true statment for correct purchase
if ( ( true === $echo_to_screen ) && ( $cart != null ) && ( $errorcode == 0 ) && ( $sessionid != null ) ) {
The value you need is $cart[0][prodid];
There are 2 array’s you can get information from $purchase_log and $cart