Home > ASP Development > Need help thinking about mp3 purchase & download?

Need help thinking about mp3 purchase & download?



I have been asked to think about adding mp3 download to my current shop setup and thought some of you's might be able to advise as to what can and can't be done.



Currently a user can add Cd's and DVDs to cart, fill in address, and in turn CC details on Sec pay Secure servers, the transaction takes places, the order gets sent to client for distribution.



The user then gets taken to a callback page which confirms order confirmation after purchase and is informed of success or not, in turn the database order is deleted/cleaned up by matching the original order number with order number that comes back from sec pay to the callback page.



from here, I was thinking to add mp3 download. Is to add an mp3 section to the shop, and in turn display a list of the albums, when clicked these display each track of the album with an add to cart next to it, price per tune etc, and in addition a check box for download whole album for a slightly reduced price, this check box somehow represents the whole album of tracks, perhaps a whole column in a database, or a table for each album or tracks, i.e. if selected select all tracks rather than just individual tracks



now for the bits i don't quite understand, and wanted your opinions on!



currently I can pass custom variables to the shop and have these returned to the callback page no problem, acting on these etc, and was thinking perhaps to use these as triggers.



I understand from reading up a little, the MD5 hash system encodes a URL i.e. a set URL to the mp'3'/s on a secure site, (again i don't how, or if this is the right way to go about it or not, correct me if you know different), and considering the user gives their email as part of the order, then this could be used to email the mp'3 URL's after purchase.



although Secpay mentions it as part of the shop, and perhaps this needs to take place before, or become part of the Secpay transaction?? again need direction on this!



thinking about how to trigger these URL's I thought perhaps have a custom variable assigned to the cart icon for each one when selected. This gets passed through the shop process, when transaction is confirmed ok, the callback page requests these custom variables when the user reaches it, (the callback page is being called from sec pay) convert the variables by matching these to database variables already set confirming which URL's should be sent, and in turn getting the actual URL's of the mp3's again already set from a database again stored securely, these then get encoded by the MD5 hash! and in turn get emailed to the customer who placed the order.



I Just wanted to know if I am on the right tracks or not?



Any ideas, suggestions or opinions would be really good.



Regards & thanks in advance

    
Guest


elviscat,



have you found a solution for this problem yet, to allow users to download the mp3 files they purchase?



As I have found some code that should help you and won't show where the mp3 files are stored.

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by markoc

As I have found some code that should help you and won't show where the mp3 files are stored.


Even if elviscat has found the answer, it would benefit other forum members to see the answer.

You never know when it may come in handy for others.

Was this answer helpful ? Yes No   
Guest


It's not just masking the URL where the files are stored that is the problem. You need to make sure that the file can only be downloaded once/twice by the user so that they can't then give the url to someone else to download the mp3. Sounds like he's on the right tracks though

Was this answer helpful ? Yes No   
Guest


lewy, firstly i will be posting the answer but i have to alter a few bit first. then i add a link to download it for you.



As Padwah said it's not just a url link needed.



so for this example i first have a page which creates the order and gives the order number and product id a random key (numeric and phonetic 20 char long). then shows the link. in the download page it first checks to see if the order is valid and has not been downloaded already then get's the file then after that the db is updated to show the download has been completed.



will post asap

Was this answer helpful ? Yes No   
Guest


ok here you go, here is what i've done the mp3 file is just a dummy file, hope it helps...

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved