Working on Fastlink

This commit is contained in:
David Bomba 2022-08-06 16:58:48 +10:00
parent 69f2b7059e
commit edfbcb9514
4 changed files with 57 additions and 1 deletions

View File

@ -65,7 +65,47 @@ class Yodlee
'loginName' => 'test123',
];
return $this->bankRequest('/user/register', 'post', $user, ['Authorization' => $token]);
/*
{
"user": {
"preferences": {
"dateFormat": "string",
"timeZone": "string",
"currency": "USD",
"locale": "en_US"
},
"address": {
"zip": "string",
"country": "string",
"address3": "string",
"address2": "string",
"city": "string",
"address1": "string",
"state": "string"
},
"loginName": "string",
"name": {
"middle": "string",
"last": "string",
"fullName": "string",
"first": "string"
},
"email": "string",
"segmentName": "string"
}
}
*/
$response = Http::withHeaders($this->getHeaders(["Authorization" => "Bearer {$token}"]))->post($this->api_endpoint. "/user/register", $user);
if($response->successful())
return $response->object();
if($response->failed())
return $response->body();
return $response;
}

View File

@ -36,6 +36,10 @@ return new class extends Migration
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade')->onUpdate('cascade');
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade');
});
Schema::table('accounts', function (Blueprint $table) {
$table->text('bank_integration_account_id')->nullable();
});
}
/**

View File

@ -27,6 +27,7 @@
'click',
function() {
window.fastlink.open({
flow: 'edit',//flow changes depending on what we are doing sometimes it could be add/edit etc etc
fastLinkURL: '{{ $fasttrack_url }}',
accessToken: 'Bearer {{ $access_token }}',
params: {

View File

@ -28,6 +28,17 @@ class YodleeApiTest extends TestCase
}
public function testCreateUser()
{
$yodlee = new Yodlee(true);
$user = $yodlee->createUser();
nlog($user);
}
public function testAccessTokenGeneration()
{