diff --git a/src/Command/ProcessLatePaymongoTransactionsCommand.php b/src/Command/ProcessLatePaymongoTransactionsCommand.php index c09545e5..5397a7a2 100644 --- a/src/Command/ProcessLatePaymongoTransactionsCommand.php +++ b/src/Command/ProcessLatePaymongoTransactionsCommand.php @@ -85,6 +85,8 @@ class ProcessLatePaymongoTransactionsCommand extends Command $output->writeln('Marked transaction '. $trans->getID() . ' as paid.'); $x++; + } else { + $output->writeln('Insufficient payment amount (' . $amount_paid . '/' . $trans->getAmount() . ') for this transaction: ' . $trans->getID() . ''); } } else { $output->writeln('No payments found for transaction: ' . $trans->getID() . ''); diff --git a/src/EntityListener/GatewayTransactionListener.php b/src/EntityListener/GatewayTransactionListener.php index 0dd6966d..530f0093 100644 --- a/src/EntityListener/GatewayTransactionListener.php +++ b/src/EntityListener/GatewayTransactionListener.php @@ -59,7 +59,7 @@ class GatewayTransactionListener ]); // make sure the object exists and has not been processed yet - if (!empty($obj) && $obj->getStatus === InsuranceApplicationStatus::CREATED) { + if (!empty($obj) && $obj->getStatus() === InsuranceApplicationStatus::CREATED) { // mark as paid $obj->setDatePay(new DateTime()); $obj->setStatus(InsuranceApplicationStatus::PAID);