Skip to content

Commit

Permalink
Merge pull request #2 from Shipu/master
Browse files Browse the repository at this point in the history
Fixed Missing Uses Namespace
  • Loading branch information
nahid authored Mar 30, 2017
2 parents 65e4125 + 509ccd1 commit 2ed2e98
Show file tree
Hide file tree
Showing 2 changed files with 17 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");
}
```



4 changes: 4 additions & 0 deletions src/Api/AbstractApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
namespace Nahid\EnvatoPHP\Api;

use duncan3dc\Sessions\SessionInstance;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Exception\ServerException;
use Nahid\EnvatoPHP\HttpManager\RequestHandler;
use Nahid\EnvatoPHP\HttpManager\Response;

Expand Down

0 comments on commit 2ed2e98

Please sign in to comment.