Creation Ministries International's (CMI's) current web stores do not currently support selling digital products. I investigated the matter to try to find a solution, knowing that digital products are becoming more and more important to carry. I came up with a solution we named cHub which is run on our server to allow more control than is available with our web store provide. cHub handles orders from the web stores as well as the admin interface, email communication with the customer, distribution of digital products and reporting for royalty payments.
Digital downloads are stored on Amazon's S3 service. The API is used to generate signed URLs that expire after several hours. A MySQL database is used to keep track of user downloads and limit access to 3 downloads starting out to prevent sharing of the link. This limit can be increased from the admin panel. The user's IP address is stored and used in combination with a randomly generated hash cookie to allow for situations such as a failed download or range request from counting as a separate download each time. This helps keep customer support request to a minimum.
In addition to digital downloads, CMI also offers a digital magazine currently hosted with Texterity. cHub communicates with Texterity's server to provide access to the purchased issues and send email communications.