in php_error.log, i get this “PHP Fatal error: Uncaught Exception: Failed to validate code due to an error: HTTP 403 in /Applications/MAMP/htdocs…”
the concerned code is:
if ($responseCode !== 200)
throw new Exception(“Failed to validate code due to an error: HTTP {$responseCode}”);
You need to grab a personal token from https://build.envato.com/my-apps/, and enter it into the code. Make sure to enable the permission “View your items’ sales history”
i have created a personal token with the correct rights.
But my problem is i have not yet item in themeforest. i tried your code with one item i bought.
Not possible … You’ll have to trust that it works, unfortunately. There is no way to get a test purchase code at the moment, and you can’t use a purchase code belonging to another author.
As you suggest I pushed my plugin trusting on this as I cannot test it, but still not working!
How can I solve a problem I cannot reproduce and how can I marked as solved without being able to test it myself. Should I upload code until buyers don’t report any problem? It’ll take ages and I’ll annoy my customers.
I have a buyer purchase code and I’ve created a personal token and I still getting an error:
{"error":404,"description":"No sale belonging to the current user found with that code"}
If it still doesn’t work, please post your PHP code here or on a snippet-sharing website like GitHub Gist and I’ll take a look. Be sure to remove your personal token when doing so.