Working with Finicity API getting- Fatal error: Uncaught Error: Class "FinicityAPILibFinicityAPIClient" not found in <location>

  api, php

I’m working with the Finicity API, I’ve done the composer install. The file with the code is in the same directory as the vender folder

Fatal error: Uncaught Error: Class "FinicityAPILibFinicityAPIClient" not found in /home/distractionfinish.com/nexus/src/index.php:28

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
<?php

require_once(__DIR__ . '/vendor/autoload.php');

use FinicityAPILibModels;
use FinicityAPILibExceptions;
use FinicityAPILibFinicityAPIClient;

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

$finicityAppKey = '0f81146db4492a8f398e57fb07cc053c';
$finicityAppToken = 'Finicity-App-Token';
$client = new FinicityAPIClient($finicityAppKey, $finicityAppToken);
try {
$authenticationController = $client->getAuthentication();

$contentType = 'application/json';
$accept = 'application/json';
$body = new ModelsPartnerCredentials;
$body->partnerId = '2445583867880';
$body->partnerSecret = '<secret code here>';


    $result = $authenticationController->partnerAuthentication($contentType, $accept, $body);
} catch (ExceptionsExpiredToken $e) {
    echo 'Caught ExpiredToken: ',  $e->getMessage(), "n"; 
} catch (FinicityAPILibAPIException $e) {
    echo 'Caught APIException: ',  $e->getMessage(), "n"; 
}
?>
        testing testing

    </body>
</html>

I’m just dumb and don’t know what’s wrong. Any help is greatly appreciated.

Source: Ask PHP

LEAVE A COMMENT