Skip to content

Commit

Permalink
import scope boundaries fix
Browse files Browse the repository at this point in the history
api response parser fix
  • Loading branch information
Vitexus committed Nov 4, 2024
1 parent 7a1bef2 commit b5e2e0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Pohoda/RaiffeisenBank/PohodaBankClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function setScope($scope): void

if ($scope !== 'auto' && $scope !== 'today' && $scope !== 'yesterday') {
$this->since = $this->since->setTime(0, 0);
$this->until = $this->until->setTime(0, 0);
$this->until = $this->until->setTime(23, 59);
}
}

Expand Down Expand Up @@ -233,14 +233,14 @@ public function insertTransactionToPohoda($success)
++$success;
}

if (property_exists($this->response, 'producedDetails') && \is_array($this->response->producedDetails)) {
if (isset($this->response->producedDetails) && \is_array($this->response->producedDetails)) {
$producedId = $this->response->producedDetails['id'];
$producedNumber = $this->response->producedDetails['number'];
$producedAction = $this->response->producedDetails['actionType'];
} else {
echo '';
}
} catch (\Pohoda\Exception $exc) {
} catch (\Exception $exc) {
$producedId = 'n/a';
$producedNumber = 'n/a';
$producedAction = 'n/a';
Expand Down
3 changes: 2 additions & 1 deletion src/Pohoda/RaiffeisenBank/Transactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ public function getTransactions()
$transactions = array_merge($transactions, $result['transactions']);
}
} while ($result['lastPage'] === false);
} catch (Exception $e) {
} catch (\VitexSoftware\Raiffeisenbank\ApiException $e) {
echo 'Exception when calling GetTransactionListApi->getTransactionList: ', $e->getMessage(), \PHP_EOL;
exit($e->getCode());
}

return $transactions;
Expand Down

0 comments on commit b5e2e0d

Please sign in to comment.