class PisAuthorisationService {

    public Optional<ScaStatus> getAuthorisationScaStatus(String paymentId, String authorisationId) {
        CmsResponse<ScaStatus> cmsResponse = authorisationServiceEncrypted.getAuthorisationScaStatus(authorisationId, new PisAuthorisationParentHolder(paymentId));

        if (cmsResponse.hasError()) {
            return Optional.empty();
        }

        return Optional.ofNullable(cmsResponse.getPayload());
    }

}