Do not paste download link directly, insteaddo as following:
After receiving payment
Create a simple link that lead to downloadfile.php
in download file.php
check for cookie to validate a user
if cookie is found(user validated) then throw content of file as downloadable content using headers as following:
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
flush();
readfile($file);
exit;
hope that helps: