class PaymentController extends AbstractController implements PaymentApi {

    @Override
    public ResponseEntity<Object> getPaymentInitiationStatus(PaymentService paymentService,
                                                             PaymentProduct paymentProduct,
                                                             String paymentId,
                                                             Map<String, String> parameters,
                                                             Map<String, String> headers) {
        RequestHeaders requestHeaders = RequestHeaders.fromMap(headers);
        RequestParams requestParams = RequestParams.fromMap(parameters);

        if (requestHeaders.isAcceptJson()) {
            Response<PaymentInitiationStatusResponse200Json> response =
                this.paymentService.getPaymentInitiationStatus(paymentService,
                    paymentProduct,
                    paymentId,
                    requestHeaders,
                    requestParams);

            return ResponseEntity.status(HttpStatus.OK)
                .headers(headersMapper.toHttpHeaders(response.getHeaders()))
                .body(response.getBody());
        }

        Response<String> response =
            this.paymentService.getPaymentInitiationStatusAsString(paymentService,
                paymentProduct,
                paymentId,
                requestHeaders,
                requestParams);

        return ResponseEntity
            .status(HttpStatus.OK)
            .headers(headersMapper.toHttpHeaders(response.getHeaders()))
            .body(response.getBody());
    }

    public  PaymentController(PaymentInitiationService paymentService,
                             HeadersMapper headersMapper,
                             ObjectMapper objectMapper);

}