Skip to content

Commit

Permalink
updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrax committed Jan 10, 2025
1 parent 23fdeb7 commit 5eda86c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ composer require epmnzava/ae_ds
```php

$ae = new AeDs($api_key,$api_secret,$code);
$token = $ae->getRefreshToken($refresh_token);
$token = $ae->getRefreshToken($refresh_token);

$res = $ae->getProduct($token, $product_id);
$res = $ae->getProduct($token, $product_id);
// it will give you only one product with all details
```

Expand Down
4 changes: 2 additions & 2 deletions src/AeDs.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public function getRefreshToken($refresh_token)

try {
$response = $client->execute($request, null);
$this->token = json_decode($response)->access_token;
//$this->token = json_decode($response)->access_token;

$this->refresh_token = json_decode($response)->refresh_token;
return json_decode($response)->access_token;
return json_decode($response)->refresh_token;
} catch (Exception $e) {
echo $e->getMessage();
}
Expand Down

0 comments on commit 5eda86c

Please sign in to comment.