Add some debug info to bunq and update the composer file [skip ci]

This commit is contained in:
James Cole
2018-12-20 23:06:47 +01:00
parent b6c23b8eb3
commit cd47b45fce
2 changed files with 72 additions and 62 deletions

View File

@@ -141,11 +141,19 @@ class StageImportDataHandler
private function convertPayment(BunqPayment $payment, int $bunqAccountId, LocalAccount $source): array
{
Log::debug(sprintf('Now at payment with ID #%d', $payment->getId()));
Log::debug(sprintf('Object dump: %s', print_r($payment, true)));
$type = TransactionType::WITHDRAWAL;
$counterParty = $payment->getCounterpartyAlias();
$amount = $payment->getAmount();
$paymentId = $payment->getId();
// is there meta data to indicate this is a saving or something?
Log::debug(sprintf('Subtype is %s', $payment->getSubType()));
Log::debug(sprintf('Amount is %s %s', $amount->getCurrency(), $amount->getValue()));
$expected = AccountType::EXPENSE;
if (1 === bccomp($amount->getValue(), '0')) {
@@ -171,6 +179,7 @@ class StageImportDataHandler
'user' => $this->importJob->user_id,
'type' => $type,
'date' => $created->format('Y-m-d'),
'timestamp' => $created->toAtomString(),
'description' => $payment->getDescription(),
'piggy_bank_id' => null,
'piggy_bank_name' => null,