Jump to content

pay to download, how do I handle this?


simflex

Recommended Posts

Dear Experts,

 

We have a lot music tracks on our database that we would like to display on a three -column per row layout on our website.

 

Our objective is to have each music and the amount associated with that music next to it and then a download button or link.

 

If a user clicks on that download link, then a link or icon displays asking the user to pay for the music s/he is attempting to download.

 

This is kind of like shopping cart except user can download after making payment.

 

The part that is presenting difficulty for us how to display the music track, the amount, the download link and when user clicks that download link, show pay.

 

Any ideas how to approach this?

 

If there is any link that can help, please let me know.

 

Thanks a lot in advance.

Link to comment
Share on other sites

Either change the link so that it takes them to the purchase page, or make the download link redirect the user (with or without a warning) to the purchase page. When they buy it, redirect them back to the initial page they were on - the one with the link they clicked.

 

If it's not obvious, you never link to the actual music file. Downloads should always be handled by a PHP script which authenticates the user before directly outputting the music file. Really the music itself shouldn't be located anywhere on your server in a place that someone could access it over the web.

Link to comment
Share on other sites

If it's not obvious, you never link to the actual music file. Downloads should always be handled by a PHP script which authenticates the user before directly outputting the music file. Really the music itself shouldn't be located anywhere on your server in a place that someone could access it over the web.

 

Agreed.  Instead of having PHP directly manage the download, however, you can use something like X-Sendfile, and have PHP only manage the authentication.

Link to comment
Share on other sites

I assume the “payments” involve actual money? Then this isn't the kind of task you can handle with copypasta from the interwebs.

 

The approach already irritates me. If you cannot –  excuse my French – write a friggin' link script after somebody has explained it to you, how on earth are you going to implement a safe payment process?

 

There are two options:

  • Install a mainstream shop application which supports virtual products and can be customized enough to fit your needs.
  • Hire(!) an actual(!) programmer to implement a custom solution. This will be expensive and risky, because there are a lot of people who also try the copypasta route and like to disppear when you need them the most.
  • Like 1
Link to comment
Share on other sites

Hi Jacques,

 

I am beginning to think that it is the way that I frame my questions that give the experts the wrong impression about what I can or cannot do.

 

I have actually implemented, quite successfully, shopping cart app.

 

If I didn't specify so, I would like to say that the only issue I am struggling to figure out is how to show the product, the price and download link.

 

The big issue for me is when a user clicks the download link, rather then show the product to download but to show them pay link and if the user pays, then the download reappears and this time, the user is able to download the music.

 

Unless I am wrong, I think is different from straight up shopping cart where user clicks add to cart, checkout or continue etc.

 

So, the issue with me is NOT how to implement shopping cart because I have done that using php, classic asp and asp.net.

 

 

The issue is how to present download and user clicks on download, rather than show the product to download but to show pay for the item link.

 

Sorry if it makes look like I need to hire a programmer.

 

As you know from experience, no matter how good you think you are, there are things you struggle to figure out.

 

thanks for you help

Link to comment
Share on other sites

Unless I am wrong, I think is different from straight up shopping cart where user clicks add to cart, checkout or continue etc.

Not really. Your download link would just do the equivalent of adding the item to the cart then going to straight to the checkout page for the user to enter their payment information. Once the payment goes through successfully you'd then re-direct them somewhere to download the song.

Link to comment
Share on other sites

The thing I have to bring up - and I'm surprised I am the first to do so - is: Do you have the right to be charging for this music? Or do you just have this fabulous collection of oldies or such that you think there may be a demand for?

 

I, for one, would not be helpful at all to anyone stealing money from the artists' who created this treasure trove.

Link to comment
Share on other sites

I am a classic asp/.net/sql server developer.

 

Once in a while, I make a foray into php and I have not done it consistently well enough to get a hang of it but doesn't discourage me from trying.

 

However, one thing I have noticed is that someone is seriously in need of help. S/he posts a question.

 

Several well intentioned helpers come up with some useful suggestions on how to help the OP.

 

Some provide sample code.

 

Then there is *always* someone who feels he needs to be heard and then comes up with some silly comments, none of which helps the OP looking for help.

 

Whether the music is mine and I decide to sell it, how does your comment help me????

 

You can decide that you have a solution to my problem but since I am not giving it away, you would not help me.

 

That's completely within your rights but don't come here wasting a space just to make some unrelated comments.

 

I said I have some music in our database. There is no way a reasonable individual would infer that it is mine and even if it is, I am not asking a Priest if I can or cannot sell it.

 

I am asking for CODING help. That is why NO ONE but you ventured into that moral space.

Link to comment
Share on other sites

I said I have some music in our database. There is no way a reasonable individual would infer that it is mine and even if it is, I am not asking a Priest if I can or cannot sell it.

 

I am asking for CODING help. That is why NO ONE but you ventured into that moral space.

 

So, are you inferring that ginergm is the only moral individual here?

 

There have been previous questions asking how to implement some unethical or illegal script, and members of this forum typically offered no help.  Now, if you have a legal right to sell them, they have been been very forthcoming.

Link to comment
Share on other sites

You have written so much English about nothing here. If you can't see that the attitude I expressed is definitely worthy of saying then you have the problem, not us on the forum. To help a possible illegal operation in the making would be not only immoral but possibly prosecutable should the real copyright owner decide to pursue all who brought this to fruition.

 

Go back to "classic asp/.net/sql" where apparently such concerns of legality aren't expressed. Here in the PHP world we do have some morals and concerns other than "CODING help".

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.