From 0377bb602a5b0b015045ad9a5209adfdde831c5c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 16 Apr 2025 12:16:50 +1000 Subject: [PATCH] Disable update account on nordigen to preserve requests --- app/Http/Requests/Account/CreateAccountRequest.php | 1 + app/Jobs/Bank/ProcessBankTransactionsNordigen.php | 3 ++- tests/Feature/SubscriptionApiTest.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/Account/CreateAccountRequest.php b/app/Http/Requests/Account/CreateAccountRequest.php index 5eeea248c4..667de4a1c5 100644 --- a/app/Http/Requests/Account/CreateAccountRequest.php +++ b/app/Http/Requests/Account/CreateAccountRequest.php @@ -60,6 +60,7 @@ class CreateAccountRequest extends Request public function prepareForValidation() { + $input = $this->all(); $input['user_agent'] = request()->server('HTTP_USER_AGENT'); diff --git a/app/Jobs/Bank/ProcessBankTransactionsNordigen.php b/app/Jobs/Bank/ProcessBankTransactionsNordigen.php index 26eb892cd8..dece8bba73 100644 --- a/app/Jobs/Bank/ProcessBankTransactionsNordigen.php +++ b/app/Jobs/Bank/ProcessBankTransactionsNordigen.php @@ -73,7 +73,8 @@ class ProcessBankTransactionsNordigen implements ShouldQueue // UPDATE ACCOUNT try { - $this->updateAccount(); + // $this->updateAccount(); + $this->nordigen_account = true; } catch (\Exception $e) { nlog("Nordigen: {$this->bank_integration->nordigen_account_id} - exited abnormally => " . $e->getMessage()); diff --git a/tests/Feature/SubscriptionApiTest.php b/tests/Feature/SubscriptionApiTest.php index abaf676d7b..2a3ae1dd4b 100644 --- a/tests/Feature/SubscriptionApiTest.php +++ b/tests/Feature/SubscriptionApiTest.php @@ -163,7 +163,6 @@ class SubscriptionApiTest extends TestCase $this->travelTo($timezone_now->copy()->startOfDay()->subHour()); $i = false; - //Capture companies within the window of 00:00 and 00:30 if($timezone_now->gte($timezone_now->copy()->startOfDay()) && $timezone_now->lt($timezone_now->copy()->startOfDay()->addMinutes(30))) { @@ -178,6 +177,8 @@ class SubscriptionApiTest extends TestCase ->whereDate('due_date', '<=', now()->setTimezone($company->timezone()->name)->addDay()->startOfDay()) ->get(); + // nlog($i->count()); + // nlog($i->toArray()); } $this->assertFalse($i);