PHP code example of shubinmi / yodlee-rest-api
1. Go to this page and download the library: Download shubinmi/yodlee-rest-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shubinmi / yodlee-rest-api example snippets
use YodleeRestApi\services\YodleeUserStory;
use YodleeRestApi\dto\config\YodleeConfig;
$yodleeConfig = new YodleeConfig();
$yodleeConfig->setApplicationId('081A2965D8CE7167777482996DA4600')
->setCobrandId('19910013777')
->setCobrandLogin('sandbox64')
->setCobrandPass('pass#777')
->setApiVersion('v1')
->setApiEndpoint('https://stage.api.yodlee.com/ysl/private-sandbox64/');
$userStory = new YodleeUserStory($yodleeConfig);
if (!$userExist = rand(0, 1)) {
if (!$user = $userStory->create(
'login', 'pass', '[email protected]', 'Name'
)) {
echo json_encode($userStory->getErrors());
die;
}
} else {
if (!$user = $userStory->login('login', 'pass')) {
echo json_encode($userStory->getErrors());
die;
}
}
var_dump($user);
if (!$widget = $userStory->myFastLink()) {
echo json_encode($userStory->getErrors());
die;
}
echo '<form action="' . $widget->getUrl() . '" method="POST">';
foreach ($widget->getParameters() as $key => $value) {
echo "<input type='hidden' name='{$key}' value='{$value}'>";
}
echo '<button value="Get Banks widget" type="submit"/>';
echo '</form>';