I’m developing a small app that can be used to display all the items you have for sale on Envato Marketplaces, and I was thinking of the way Envato proceeds with this. For example if you’ve already purchased a certain product, they will display a message with a link to the download.
Well, I’m trying something similar, instead of throwing a Purchase button, show a Download button that leads you to the Envato Download Center, or to the item page or maybe directly to the download. But what’s the logic behind that ? How is that achieved ? Is it enough to use just my API key to check if any visitor has already purchased an item I’m displaying, or how does this actually work ?
You will need to have the users licence purchase code.
If you have this code, you can verify if they have purchased one of your files.
If they have purchased one of your files, you can get the direct item download url via the envato api.
Here is an example of the envato api download feature that I created some time ago: http://dtbaker.com.au/envato/download.php (source code)
dtbaker said
You will need to have the users licence purchase code.
If you have this code, you can verify if they have purchased one of your files.
If they have purchased one of your files, you can get the direct item download url via the envato api.
Here is an example of the envato api download feature that I created some time ago: http://dtbaker.com.au/envato/download.php (source code)
Oh, this one I know how to do it, I’m already using that. What I was thinking if there’s a way to detect if the user is logged in already and pull that info from their account in order to display either an Purchase button or a Download button.
So this way is the only one ? Also, I think there’s no need for the client’s API key, they just need the username and the purchase code, isn’t it ?