usability fixes
This commit is contained in:
@@ -84,7 +84,7 @@ public class ZesaConfirmationHotProcessor implements TransactionProcessorInterfa
|
|||||||
|
|
||||||
transaction.setCreditAmount(transactionService.calculateCreditAmount(transaction));
|
transaction.setCreditAmount(transactionService.calculateCreditAmount(transaction));
|
||||||
|
|
||||||
if (!hotRechargeBalanceService.checkBalance(token, transaction.getAmount(), accId)) {
|
if (!hotRechargeBalanceService.checkBalance(token, transaction.getCreditAmount(), accId)) {
|
||||||
transaction.setStatus(Status.FAILED);
|
transaction.setStatus(Status.FAILED);
|
||||||
transaction.setResponseCode("92");
|
transaction.setResponseCode("92");
|
||||||
transaction.setErrorMessage("There's a technical issue on our end. Please try again later.");
|
transaction.setErrorMessage("There's a technical issue on our end. Please try again later.");
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class GatewayPaymentHandler implements HandlerInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we've done this before then return
|
// if we've done this before then return
|
||||||
if(transaction.getPaymentStatus().equals(Status.SUCCESS))
|
if(Status.SUCCESS.equals(transaction.getPaymentStatus()))
|
||||||
return transaction;
|
return transaction;
|
||||||
|
|
||||||
transactionService.save(transaction);
|
transactionService.save(transaction);
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ public class IntegrationHandler implements HandlerInterface {
|
|||||||
transaction.setType(RequestType.INTEGRATION);
|
transaction.setType(RequestType.INTEGRATION);
|
||||||
|
|
||||||
// if we've done this before then return
|
// if we've done this before then return
|
||||||
if(transaction.getIntegrationStatus().equals(Status.SUCCESS))
|
if(Status.SUCCESS.equals(transaction.getIntegrationStatus()))
|
||||||
return transaction;
|
return transaction;
|
||||||
|
|
||||||
if(!transaction.getPollingStatus().equals(Status.SUCCESS))
|
if(!Status.SUCCESS.equals(transaction.getPollingStatus()))
|
||||||
throw new ApiException("Transaction failed: Polling is not yet complete" );
|
throw new ApiException("Transaction failed: Polling is not yet complete" );
|
||||||
|
|
||||||
// prevent race condition
|
// prevent race condition
|
||||||
|
|||||||
Reference in New Issue
Block a user