diff --git a/src/main/java/zw/qantra/tm/domain/services/processors/confirmations/hotrecharge/ZesaConfirmationHotProcessor.java b/src/main/java/zw/qantra/tm/domain/services/processors/confirmations/hotrecharge/ZesaConfirmationHotProcessor.java index 77c6913..2bda39e 100644 --- a/src/main/java/zw/qantra/tm/domain/services/processors/confirmations/hotrecharge/ZesaConfirmationHotProcessor.java +++ b/src/main/java/zw/qantra/tm/domain/services/processors/confirmations/hotrecharge/ZesaConfirmationHotProcessor.java @@ -84,7 +84,7 @@ public class ZesaConfirmationHotProcessor implements TransactionProcessorInterfa transaction.setCreditAmount(transactionService.calculateCreditAmount(transaction)); - if (!hotRechargeBalanceService.checkBalance(token, transaction.getAmount(), accId)) { + if (!hotRechargeBalanceService.checkBalance(token, transaction.getCreditAmount(), accId)) { transaction.setStatus(Status.FAILED); transaction.setResponseCode("92"); transaction.setErrorMessage("There's a technical issue on our end. Please try again later."); diff --git a/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/GatewayPaymentHandler.java b/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/GatewayPaymentHandler.java index 6b64e3e..2f82111 100644 --- a/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/GatewayPaymentHandler.java +++ b/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/GatewayPaymentHandler.java @@ -38,7 +38,7 @@ public class GatewayPaymentHandler implements HandlerInterface { } // if we've done this before then return - if(transaction.getPaymentStatus().equals(Status.SUCCESS)) + if(Status.SUCCESS.equals(transaction.getPaymentStatus())) return transaction; transactionService.save(transaction); diff --git a/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/IntegrationHandler.java b/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/IntegrationHandler.java index acfd303..f8beb2d 100644 --- a/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/IntegrationHandler.java +++ b/src/main/java/zw/qantra/tm/domain/services/processors/workflows/handlers/IntegrationHandler.java @@ -36,10 +36,10 @@ public class IntegrationHandler implements HandlerInterface { transaction.setType(RequestType.INTEGRATION); // if we've done this before then return - if(transaction.getIntegrationStatus().equals(Status.SUCCESS)) + if(Status.SUCCESS.equals(transaction.getIntegrationStatus())) return transaction; - if(!transaction.getPollingStatus().equals(Status.SUCCESS)) + if(!Status.SUCCESS.equals(transaction.getPollingStatus())) throw new ApiException("Transaction failed: Polling is not yet complete" ); // prevent race condition