mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some fixes for #1378
This commit is contained in:
@@ -798,6 +798,7 @@ class BunqRoutine implements RoutineInterface
|
||||
$mapping = $config['accounts-mapped'];
|
||||
$token = new SessionToken($config['session_token']);
|
||||
$count = 0;
|
||||
$all = [];
|
||||
if (0 === $user->getId()) {
|
||||
$user = new UserCompany($config['user_company']);
|
||||
Log::debug(sprintf('Will try to get transactions for company #%d', $user->getId()));
|
||||
@@ -826,7 +827,7 @@ class BunqRoutine implements RoutineInterface
|
||||
'import_id' => $importId,
|
||||
'payments' => $payments,
|
||||
];
|
||||
$count += count($payments);
|
||||
$count += \count($payments);
|
||||
}
|
||||
Log::debug(sprintf('Total number of payments: %d', $count));
|
||||
$this->addStep();
|
||||
|
@@ -22,6 +22,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Services\Bunq\Request;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Services\Bunq\Id\InstallationId;
|
||||
use FireflyIII\Services\Bunq\Object\ServerPublicKey;
|
||||
use FireflyIII\Services\Bunq\Token\InstallationToken;
|
||||
@@ -96,12 +97,19 @@ class InstallationTokenRequest extends BunqRequest
|
||||
* @param array $response
|
||||
*
|
||||
* @return InstallationId
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function extractInstallationId(array $response): InstallationId
|
||||
{
|
||||
$installationId = new InstallationId;
|
||||
$data = $this->getKeyFromResponse('Id', $response);
|
||||
$installationId->setId((int)$data['id']);
|
||||
|
||||
if (!isset($data['id'])) {
|
||||
Log::error('No installation token in bunq response.', $response);
|
||||
throw new FireflyException('There is no installation token in the bunq response. Sorry, I cannot continue.');
|
||||
}
|
||||
|
||||
$installationId->setId($data['id']);
|
||||
|
||||
return $installationId;
|
||||
}
|
||||
|
@@ -583,6 +583,7 @@ return [
|
||||
'converted_to_Deposit' => 'The transaction has been converted to a deposit',
|
||||
'converted_to_Transfer' => 'The transaction has been converted to a transfer',
|
||||
'invalid_convert_selection' => 'The account you have selected is already used in this transaction or does not exist.',
|
||||
'source_or_dest_invalid' => 'Cannot find the correct transaction details. Conversion is not possible.',
|
||||
|
||||
// create new stuff:
|
||||
'create_new_withdrawal' => 'Create new withdrawal',
|
||||
|
Reference in New Issue
Block a user