Optional<Customer> customer=customerRepository.findById(Long.valueOf(paymentInformationRequest.getClientId()));
if (customer.isEmpty()) {
log.info("BGWService.createPaymentInformation. no customer with id: {}", paymentInformationRequest.getClientId());
throw new IllegalArgumentException("BGWService.createPaymentInformation. no customer with id:"+paymentInformationRequest.getClientId());
}
Optional<Customer> customer=customerRepository.findById(Long.valueOf(paymentInformationRequest.getClientId()));
if (customer.isEmpty()) {
log.info("BGWService.createPaymentInformation. no customer with id: {}", paymentInformationRequest.getClientId());
throw new IllegalArgumentException("BGWService.createPaymentInformation. no customer with id:"+paymentInformationRequest.getClientId());
}