Sorted by: 1. Please try following, Its tested and working. "https://api.envato.com/v3/market/author/sale? code=$code", CURLOPT_ Stack Overflow
If the Envato API goes down temporarily, ensure your script doesn't lock users out of their software immediately. Give a 3-day grace period before re-checking. To proceed with your licensing setup, let me know:
if ($response) $responseData = json_decode($response, true); if ($responseData['verified']) echo 'Purchase code is valid!'; else echo 'Purchase code is invalid!';