joejac
Posts: 242
|
| Posted: 03/31/2009, 3:55 PM |
|
Hello,
I have a customer that would like to sell his digital products. He will present in his web site a preview with a watermark and a payment link to a payment processor. One product - one sale, no shopping cart.
How can I help him to deliver his product in an automatic way, that when the web sites receives the payment confirmation and reference, the buyer can download the purchased product and to ensure the product will be delivered to the buyer and no other. I am not familiar with the safe sale of digital products.
Any help with detailed indications, scripts, tutorials or links it is very much appreciated.
Best regards
joejac
|
 |
 |
JimmyCrackedCorn
Posts: 583
|
| Posted: 03/31/2009, 9:56 PM |
|
I know you said there is no shopping cart but maybe this info will help you figure something out!
We use ProductCart for our eCommerce apps and they offer some built-in features for selling digital products. They also discuss how you can write your own license generator.
You might gain some insight by reading this,
http://www.earlyimpact.com/productcart/sell-digital-products.asp
and this,
http://wiki.earlyimpact.com/developers/genlicense
Good luck!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
cleyan
Posts: 136
|
| Posted: 04/01/2009, 10:00 AM |
|
Hi
I use the followig way (I don't know if is the perfect) and for my purposes it work
1) Put the file out of the public folder (or in a password protected folder)
eg: /home/user/prods/thefile.zip where the public forder is /home/user/public_html
2) Put a php file may using passowrd or a download code, maybe as a link in the customers account, etc.
3) the php file call the following function
//usage: downloadfile('/home/user/prods/thefile.zip', 'publicname_ver.zip')
function dowanloadfile($ruta, $nombrereal){
$len = filesize($ruta);
$ctype="application/force-download";
//Begin writing headers
header("Cache-Control: max-age=60");
header("Cache-Control: private");
header("Content-Description: File Transfer");
//Use the switch-generated Content-Type
header("Content-Type: $ctype");
//Force the download
header("Content-Disposition: attachment; filename=\"$nombrereal\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$len);
@set_time_limit(0);
$fp = @fopen($ruta, "rb");
set_magic_quotes_runtime(0);
$chunksize = 1*(512*1024); // how many bytes per chunk
while($fp && !feof($fp)) {
$buffer = fread($fp, $chunksize);
print $buffer;
flush();
sleep(1);
}
set_magic_quotes_runtime(get_magic_quotes_gpc());
fclose($fp);
exit();
}
I hope this give you some ideas for your work
Regards
Carlos
_________________
**************************************************
Carlos Leyan B.
Temuco, Chile
www.leytec.net |
 |
 |
|