I think i came to the wrong place to ask this question because it is about websites, payment and download. Here is my question: how can I direct a user to a download link only when he has paid via PayPal. So, I need to prevent them from just typing in the download link. They need to pay first.
You need to put a "if condition" in the payment routine function to check whether payment has been made (maybe by taking, as an argument, a confirmation from the payment form), then automatically connects to the download link.