Fixes for bank transactions:
This commit is contained in:
parent
f1efdb663e
commit
0cae4d0671
1 changed files with 11 additions and 1 deletions
|
|
@ -58,8 +58,13 @@ class ProcessBankTransactions implements ShouldQueue
|
|||
|
||||
$this->from_date = $this->from_date ?: '2021-01-01';
|
||||
|
||||
$x = 0;
|
||||
|
||||
do{
|
||||
|
||||
$x++;
|
||||
nlog("Loop number {$x}");
|
||||
|
||||
$this->processTransactions();
|
||||
|
||||
}
|
||||
|
|
@ -70,6 +75,7 @@ class ProcessBankTransactions implements ShouldQueue
|
|||
|
||||
private function processTransactions()
|
||||
{
|
||||
|
||||
$yodlee = new Yodlee($this->bank_integration_account_id);
|
||||
|
||||
$data = [
|
||||
|
|
@ -87,6 +93,8 @@ nlog($data);
|
|||
//Get int count
|
||||
$count = $transaction_count->transaction->TOTAL->count;
|
||||
|
||||
nlog("Number of transactions = {$count}");
|
||||
|
||||
//get transactions array
|
||||
$transactions = $yodlee->getTransactions($data);
|
||||
|
||||
|
|
@ -142,8 +150,10 @@ nlog("no transactions returning");
|
|||
|
||||
$this->bank_integration->save();
|
||||
|
||||
if($count < 500)
|
||||
if($count < 500){
|
||||
$this->stop_loop = false;
|
||||
nlog("stopping while loop");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue