Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Petslane\Bondora\Definition\AccessTokenRequest' not found #4

Open
cedricdonie opened this issue Feb 28, 2017 · 0 comments
Open

Comments

@cedricdonie
Copy link

cedricdonie commented Feb 28, 2017

Hello, thank you for writing this library. However, I am having an issue. Below is the error. i have not modified the library files.

Fatal error: Uncaught Error: Class 'Petslane\Bondora\Definition\AccessTokenRequest' not found in ****/lib/Api.php:263 Stack trace: #0 ****/index.php(28): Petslane\Bondora\Api->getToken('***....') #1 {main} thrown in ****/Api.php on line 263

I have accessed the Api with this code:

use Petslane\Bondora;
require_once '../lib/Api.php';

$api = new Bondora\Api($config);

// Get login url
$url = $api->getAuthUrl();
// redirect user to $url. After login, user will be redirected back with get parameter 'code'
if (empty($_GET["code"])) {
    header("Location: " . $url);
    echo $url;
}
$code = $_GET["code"];
// get token from 'code' provided after user successful login. Store access_token and refresh_token
echo $code;
$token_object = $api->getToken($code); //Error is in this line

What could I do to fix this error? Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant