Skip to content

Commit

Permalink
fix11
Browse files Browse the repository at this point in the history
  • Loading branch information
pasqualespica committed Oct 12, 2022
1 parent c796935 commit ccb3eed
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ private PaymentPositionModel createDebtPosition(String organizationFiscalCode,

//String sUuid = new UID().toString();
// get the enrollment for the service
log.info("[PaymentPositionModel]step-1-{}",sUuid);
//log.info("[PaymentPositionModel]step-1-{}",sUuid);
ServiceRef enrollment = Optional.ofNullable(orgConfiguration.getEnrollments()).orElseGet(Collections::emptyList)
.parallelStream()
.filter(e -> e.getServiceId().equals(serviceConfiguration.getId()))
.findAny()
.orElseThrow(() -> new AppException(AppError.ENROLLMENT_TO_SERVICE_NOT_FOUND, serviceConfiguration.getId(), organizationFiscalCode));
log.info("[PaymentPositionModel]step-2-{}",sUuid);
//log.info("[PaymentPositionModel]step-2-{}",sUuid);
// call the external service to get the PO
PaymentOptionModel po = this.callExternalService(spontaneousPayment, serviceConfiguration);
log.info("[PaymentPositionModel]step-3-{}",sUuid);
//log.info("[PaymentPositionModel]step-3-{}",sUuid);
// generate IUV
String iuv = this.callIuvGeneratorService(organizationFiscalCode, enrollment);

Expand All @@ -166,16 +166,16 @@ private PaymentPositionModel createDebtPosition(String organizationFiscalCode,
transfer.setCategory(serviceConfiguration.getTransferCategory());
transfer.setIban(enrollment.getIban());
transfer.setPostalIban(enrollment.getPostalIban());
log.info("[PaymentPositionModel]step-4-{}",sUuid);
//log.info("[PaymentPositionModel]step-4-{}",sUuid);
// Payment Position to create
PaymentPositionModel pp = modelMapper.map(spontaneousPayment.getDebtor(), PaymentPositionModel.class);
pp.setIupd(iupdPrefix + iuv);
pp.setCompanyName(orgConfiguration.getCompanyName());
pp.addPaymentOptions(po);
log.info("[PaymentPositionModel]step-5-{}",sUuid);
//log.info("[PaymentPositionModel]step-5-{}",sUuid);

PaymentPositionModel p = gpdClient.createDebtPosition(organizationFiscalCode, pp);
log.info("[PaymentPositionModel]step-6-{}",sUuid);
//log.info("[PaymentPositionModel]step-6-{}",sUuid);
return p;
}

Expand Down

0 comments on commit ccb3eed

Please sign in to comment.