mattspriggs28 Posted July 27, 2010 Share Posted July 27, 2010 Hi, I'm building an e-commerce site that is product downloads only. I'm trying to get my head around the best way to approach this from a process point of view. The site will be using PayPal. This is how I would envisage it: 1. User adds product to basket. This is then stored in a database table and a random code is generated and stored along with it. 2. The user pays via PayPal 3. IPN then sends message back to the basket to say that the customer has paid, and sends an email with links to the documents, using the randomly generated codes as security and to monitor the status of the download. (i.e. whether it has been downloaded or not) 4. The customer then downloads the document and the status of the download is set to 'COMPLETE' to prevent them using the link again. Is this the best way to apprach this or does anyone else have any other suggestions? Thanks Link to comment https://forums.phpfreaks.com/topic/208991-handling-downloadable-products/ Share on other sites More sharing options...
aleX_hill Posted July 27, 2010 Share Posted July 27, 2010 As far as I can tell that would be a fair way to go about it, but I would set a timeout on the link rather then just checking to see if it is downloaded. For example, if my browser downloads to a temp folder or somewhere that I cant find (or forget where to look) I might want to try again straight away, so personally I would set a 24 hour limit for the link to be active Link to comment https://forums.phpfreaks.com/topic/208991-handling-downloadable-products/#findComment-1091628 Share on other sites More sharing options...
mattspriggs28 Posted July 27, 2010 Author Share Posted July 27, 2010 That was going to be my next question regarding downloading problems, but what you say seems to get around that. Thanks for your help. Link to comment https://forums.phpfreaks.com/topic/208991-handling-downloadable-products/#findComment-1091629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.