mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on Fastlink
This commit is contained in:
parent
69f2b7059e
commit
edfbcb9514
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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: {
|
||||
|
@ -28,6 +28,17 @@ class YodleeApiTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
public function testCreateUser()
|
||||
{
|
||||
|
||||
$yodlee = new Yodlee(true);
|
||||
|
||||
$user = $yodlee->createUser();
|
||||
|
||||
nlog($user);
|
||||
|
||||
}
|
||||
|
||||
public function testAccessTokenGeneration()
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user