Hey,
is someone having issues with overriding limit in transaction preparation ?
I am trying this way and at the end the logs show the correct value but the BATM does not using it, just the one which was set by CAS.
@Override
public ITransactionPreparation overrideTransactionPreparation(ITransactionPreparation preparation) {
BigDecimal limit = identityApi.getLimitForUser(preparation.getCellPhoneUsed(),preparation.getCashCurrency());
preparation.getCashTransactionLimit().clear();
preparation.getCashTransactionLimit().put(preparation.getCashCurrency(), limit);
preparation.getCashTransactionLimitWithName().clear();
preparation.getCashTransactionLimitWithName().put(preparation.getCashCurrency(), new ITransactionLimit() {
@Override
public BigDecimal getAmount() {
return limit;
}
@Override
public String getName() {
return "LIMIT_TRANSACTION";
}
@Override
public String getCurrency() {
return preparation.getCashCurrency();
}
});
log.info("Transactions limit override");
log.info(preparation.getCashTransactionLimitWithName().get(preparation.getCashCurrency()).getAmount().toString());
log.info(preparation.getCashTransactionLimit().get(preparation.getCashCurrency()).toString());
return preparation;
}
Hey,
is someone having issues with overriding limit in transaction preparation ?
I am trying this way and at the end the logs show the correct value but the BATM does not using it, just the one which was set by CAS.