mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
Some fixes for #1378
This commit is contained in:
@@ -798,6 +798,7 @@ class BunqRoutine implements RoutineInterface
|
|||||||
$mapping = $config['accounts-mapped'];
|
$mapping = $config['accounts-mapped'];
|
||||||
$token = new SessionToken($config['session_token']);
|
$token = new SessionToken($config['session_token']);
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
$all = [];
|
||||||
if (0 === $user->getId()) {
|
if (0 === $user->getId()) {
|
||||||
$user = new UserCompany($config['user_company']);
|
$user = new UserCompany($config['user_company']);
|
||||||
Log::debug(sprintf('Will try to get transactions for company #%d', $user->getId()));
|
Log::debug(sprintf('Will try to get transactions for company #%d', $user->getId()));
|
||||||
@@ -826,7 +827,7 @@ class BunqRoutine implements RoutineInterface
|
|||||||
'import_id' => $importId,
|
'import_id' => $importId,
|
||||||
'payments' => $payments,
|
'payments' => $payments,
|
||||||
];
|
];
|
||||||
$count += count($payments);
|
$count += \count($payments);
|
||||||
}
|
}
|
||||||
Log::debug(sprintf('Total number of payments: %d', $count));
|
Log::debug(sprintf('Total number of payments: %d', $count));
|
||||||
$this->addStep();
|
$this->addStep();
|
||||||
|
@@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Services\Bunq\Request;
|
namespace FireflyIII\Services\Bunq\Request;
|
||||||
|
|
||||||
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use FireflyIII\Services\Bunq\Id\InstallationId;
|
use FireflyIII\Services\Bunq\Id\InstallationId;
|
||||||
use FireflyIII\Services\Bunq\Object\ServerPublicKey;
|
use FireflyIII\Services\Bunq\Object\ServerPublicKey;
|
||||||
use FireflyIII\Services\Bunq\Token\InstallationToken;
|
use FireflyIII\Services\Bunq\Token\InstallationToken;
|
||||||
@@ -96,12 +97,19 @@ class InstallationTokenRequest extends BunqRequest
|
|||||||
* @param array $response
|
* @param array $response
|
||||||
*
|
*
|
||||||
* @return InstallationId
|
* @return InstallationId
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function extractInstallationId(array $response): InstallationId
|
private function extractInstallationId(array $response): InstallationId
|
||||||
{
|
{
|
||||||
$installationId = new InstallationId;
|
$installationId = new InstallationId;
|
||||||
$data = $this->getKeyFromResponse('Id', $response);
|
$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;
|
return $installationId;
|
||||||
}
|
}
|
||||||
|
@@ -583,6 +583,7 @@ return [
|
|||||||
'converted_to_Deposit' => 'The transaction has been converted to a deposit',
|
'converted_to_Deposit' => 'The transaction has been converted to a deposit',
|
||||||
'converted_to_Transfer' => 'The transaction has been converted to a transfer',
|
'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.',
|
'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 stuff:
|
||||||
'create_new_withdrawal' => 'Create new withdrawal',
|
'create_new_withdrawal' => 'Create new withdrawal',
|
||||||
|
Reference in New Issue
Block a user