mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-23 01:41:34 +02:00
30 lines
780 B
PHP
30 lines
780 B
PHP
|
<?php namespace app\Console\Commands;
|
||
|
|
||
|
use Illuminate\Console\Command;
|
||
|
use App\Services\BankAccountService;
|
||
|
|
||
|
class TestOFX extends Command
|
||
|
{
|
||
|
protected $name = 'ninja:test-ofx';
|
||
|
protected $description = 'Test OFX';
|
||
|
|
||
|
public function __construct(BankAccountService $bankAccountService)
|
||
|
{
|
||
|
parent::__construct();
|
||
|
|
||
|
$this->bankAccountService = $bankAccountService;
|
||
|
}
|
||
|
|
||
|
public function fire()
|
||
|
{
|
||
|
$this->info(date('Y-m-d').' Running TestOFX...');
|
||
|
|
||
|
$bankId = env('TEST_BANK_ID');
|
||
|
$username = env('TEST_BANK_USERNAME');
|
||
|
$password = env('TEST_BANK_PASSWORD');
|
||
|
|
||
|
$data = $this->bankAccountService->loadBankAccounts($bankId, $username, $password, false);
|
||
|
|
||
|
print "<pre>".print_r($data, 1)."</pre>";
|
||
|
}
|
||
|
}
|