Skip to content

Commit

Permalink
Added Purchase Code Verify Example
Browse files Browse the repository at this point in the history
Added Purchase Code Verify Example
  • Loading branch information
Shipu authored Mar 30, 2017
1 parent d456637 commit 509ccd1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and add this facade in facades section
Run this command in your terminal

```shell
php artisan vendor:publish --tag="envato"
php artisan vendor:publish --provider="Nahid\EnvatoPHP\EnvatoServiceProvider"
```

after publishing your config file then open `config/envato.php` and add your envato app credentials.
Expand Down Expand Up @@ -81,7 +81,19 @@ $config = [
dd($user->data);
```

```php
// For envato purchase code verify

use Nahid\EnvatoPHP\Facades\Envato;

$purchaseCode = 'purchase_code_here';
$purchaseVerify = Envato::me()->sale($purchaseCode);
if($purchaseVerify->getStatusCode() == 200) {
dd($purchaseVerify->data);
} else {
dd("Invalid Purchase Code");
}
```



0 comments on commit 509ccd1

Please sign in to comment.