The best way to do it would have the user register on the site and then point them to the payment page. You would need a IPN (instant payment notification) script that communicates with your payment processor (paypal, nochex etc), which would receive a notification when the payment is processed and would 'activate' the user by providing them with a link something like download.pl?file=filetodownload which would not reveal the location of the actual file itself.