class CmsAspspPisTransactionController implements CmsAspspPisTransactionApi {

    @Override
    public ResponseEntity<Void> updatePaymentStatus(String paymentId, String status, String instanceId) {
        TransactionStatus transactionStatus;
        try {
            transactionStatus = TransactionStatus.valueOf(status);
        } catch (IllegalArgumentException illegalArgumentException) {
            return ResponseEntity.badRequest().build();
        }
        return aspspPaymentService.updatePaymentStatus(paymentId, transactionStatus, instanceId)
            ? ResponseEntity.ok().build()
            : ResponseEntity.badRequest().build();
    }

}