sdf06 error "3" for unsatisfied balances

This commit is contained in:
ialbert 2023-08-15 16:57:56 +03:00
parent 0b81edefbb
commit a3551bbc88

View file

@ -133,7 +133,7 @@ public class Sdf06Executor {
BigDecimal errorResult;
Statement stmt = null;
if (needToCreateStatement(err.get())) {
errorResult = errorResult1;
errorResult = errorById(err.get());
stmt = createStatementBySdf06(sDf06,
((Company) validator.getStored(ValidationStored.Sdf06Company)).getId(),
validator.getStored(ValidationStored.Sdf06Account));
@ -198,6 +198,13 @@ public class Sdf06Executor {
|| ClearingError.TCRegistryNotFound.equals(err.getSubject());
}
private BigDecimal errorById(EnumMessage err) {
if (ClearingError.BalanceInsufficient.equals(err.getSubject())) {
return errorResult3;
}
return errorResult1;
}
public void processGatewayResponse(BaseRequest<AssetOperationApprovalRequest> req) {
//может прийти неограниченно позже 06го, после того как прошел клиринг например...
Instant now = Instant.now();