Skip to content

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

@cedricdonie

Description

@cedricdonie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions