class PisAuthorisationService {

    public CreateAuthorisationResponse createPisAuthorisation(String paymentId, PsuIdData psuData) {
        TppRedirectUri redirectURIs = tppRedirectUriMapper.mapToTppRedirectUri(requestProviderService.getTppRedirectURI(), requestProviderService.getTppNokRedirectURI());

        CreateAuthorisationRequest request = new CreateAuthorisationRequest(psuData, scaApproachResolver.resolveScaApproach(), redirectURIs);
        CmsResponse<CreateAuthorisationResponse> cmsResponse = authorisationServiceEncrypted.createAuthorisation(new PisAuthorisationParentHolder(paymentId), request);

        if (cmsResponse.hasError()) {
            log.info("Payment-ID [{}]. Create PIS authorisation has failed: can't save authorisation to cms DB",
                     paymentId);
            return null;
        }

        return cmsResponse.getPayload();
    }

}