mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Clean up for Yodlee authentication
This commit is contained in:
parent
d80ec520f9
commit
b471920155
@ -45,9 +45,10 @@ class YodleeController extends BaseController
|
|||||||
$company->account->bank_integration_account_id = $token;
|
$company->account->bank_integration_account_id = $token;
|
||||||
$company->push();
|
$company->push();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$yodlee = new Yodlee($token);
|
$yodlee = new Yodlee($token);
|
||||||
$yodlee->setTestMode();
|
$yodlee->setTestMode();
|
||||||
}
|
|
||||||
|
|
||||||
if(!is_string($token))
|
if(!is_string($token))
|
||||||
dd($token);
|
dd($token);
|
||||||
@ -57,6 +58,8 @@ class YodleeController extends BaseController
|
|||||||
'fasttrack_url' => $yodlee->getFastTrackUrl(),
|
'fasttrack_url' => $yodlee->getFastTrackUrl(),
|
||||||
'config_name' => 'testninja',
|
'config_name' => 'testninja',
|
||||||
'flow' => $flow,
|
'flow' => $flow,
|
||||||
|
'company' => $company,
|
||||||
|
'account' => $company->account,
|
||||||
];
|
];
|
||||||
|
|
||||||
return view('bank.yodlee.auth', $data);
|
return view('bank.yodlee.auth', $data);
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('licenses', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('recurring_invoice_id')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
};
|
@ -1,17 +1,81 @@
|
|||||||
@extends('layouts.ninja')
|
@extends('layouts.ninja')
|
||||||
@section('meta_title', ctrans('texts.new_bank_account'))
|
@section('meta_title', ctrans('texts.new_bank_account'))
|
||||||
|
|
||||||
|
|
||||||
@push('head')
|
@push('head')
|
||||||
<script type='text/javascript' src='https://cdn.yodlee.com/fastlink/v4/initialize.js'></script>
|
<script type='text/javascript' src='https://cdn.yodlee.com/fastlink/v4/initialize.js'></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.loader {
|
||||||
|
border-top-color: #3498db;
|
||||||
|
-webkit-animation: spinner 1.5s linear infinite;
|
||||||
|
animation: spinner 1.5s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes spinner {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spinner {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
|
|
||||||
<div id="container-fastlink">
|
|
||||||
<div style="text-align: center;">
|
<div class="flex flex-col justify-center items-center mt-10" id="container-fastlink">
|
||||||
<input type="submit" id="btn-fastlink" value="Link an Account">
|
<div class="mb-4">
|
||||||
</div>
|
@if($account && !$account->isPaid())
|
||||||
|
<div>
|
||||||
|
<img src="{{ asset('images/invoiceninja-black-logo-2.png') }}"
|
||||||
|
class="border-b border-gray-100 h-18 pb-4" alt="Invoice Ninja logo">
|
||||||
|
</div>
|
||||||
|
@elseif(isset($company) && !is_null($company))
|
||||||
|
<div>
|
||||||
|
<img src="{{ $company->present()->logo() }}"
|
||||||
|
class="mx-auto border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="cta" class="mb-4" x-data="{ open: false }">
|
||||||
|
|
||||||
|
<button @click="open = !open" x-show="!open" type="submit" class="button button-primary bg-blue-600 my-4" id="btn-fastlink">{{ ctrans('texts.add_bank_account') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div x-show="open" class="fixed top-0 left-0 right-0 bottom-0 w-full h-screen z-50 overflow-hidden bg-gray-700 opacity-75 flex flex-col items-center justify-center">
|
||||||
|
<div class="loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12 mb-4"></div>
|
||||||
|
<h2 class="text-center text-gray text-xl font-semibold">Loading...</h2>
|
||||||
|
<p class="w-1/3 text-center text-gray">This may take a few seconds, please don't close this page.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="completed" class="mb-4">
|
||||||
|
<a class="button button-primary bg-blue-600 my-4" href="https://invoicing.co">Return to admin portal.</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@ -20,6 +84,10 @@
|
|||||||
@push('footer')
|
@push('footer')
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
var completed = document.getElementById('completed');
|
||||||
|
completed.style.display = "none"; //block
|
||||||
|
|
||||||
(function (window) {
|
(function (window) {
|
||||||
//Open FastLink
|
//Open FastLink
|
||||||
var fastlinkBtn = document.getElementById('btn-fastlink');
|
var fastlinkBtn = document.getElementById('btn-fastlink');
|
||||||
@ -48,11 +116,15 @@
|
|||||||
// will be called called to close FastLink. For list of possible message, refer to onClose(data) Method.
|
// will be called called to close FastLink. For list of possible message, refer to onClose(data) Method.
|
||||||
console.log('onclose');
|
console.log('onclose');
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
|
var completed = document.getElementById('completed');
|
||||||
|
completed.style.display = "block"; //block
|
||||||
},
|
},
|
||||||
onEvent: function (data) {
|
onEvent: function (data) {
|
||||||
// will be called on intermittent status update.
|
// will be called on intermittent status update.
|
||||||
console.log('on event');
|
console.log('on event');
|
||||||
|
var hideme = document.getElementById('cta');
|
||||||
|
hideme.style.display = "none";
|
||||||
console.log(data);
|
console.log(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user