class PisCommonPaymentServiceInternalEncrypted implements PisCommonPaymentServiceEncrypted {

    @Override
    @Transactional
    public CmsResponse<TransactionStatus> getPisCommonPaymentStatusById(String encryptedPaymentId) {
        Optional<String> decryptIdOptional = securityDataService.decryptId(encryptedPaymentId);

        if (decryptIdOptional.isEmpty()) {
            log.info("Encrypted Payment ID: [{}]. Get common payment status by ID failed, couldn't decrypt consent id",
                     encryptedPaymentId);
            return CmsResponse.<TransactionStatus>builder()
                       .error(TECHNICAL_ERROR)
                       .build();
        }

        return pisCommonPaymentService.getPisCommonPaymentStatusById(decryptIdOptional.get());
    }

}