Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 933 Bytes

readme.md

File metadata and controls

37 lines (30 loc) · 933 Bytes

Envato Purchase Code Verifier

Clone, download, or copy the 'EnvatoPurchaseCodeVerifier' class to create your own Envato purchase verifier tool. You can go to index.php to see sample code. Read EnvatoPurchaseCodeVerifier.php to understand what the class is all about. It's really simple.

Contributions are highly appreciated!


  1. Require the class file:

    require_once 'EnvatoPurchaseCodeVerifier.php';
    
  2. Use the code below to create an instance of 'EnvatoPurchaseCodeVerifier'. Create your own access token at: https://build.envato.com/create-token

    $purchase = new EnvatoPurchaseCodeVerifier($access_token);
    
  3. Then, check the user purchase code:

    $verified = $purchase->verified($buyer_purchase_code);
    // Will return false if purchase code is invalid, otherwise the purchase data.
    

That's it! Happy Coding!