Issue:
Add PayU for card payments

Resolution:
<think>
PR Context:
- Title: feat(connector): add payment create, sync, capture, refund, void, rsync support for PayU
- Merged: 2023-01-14T07:37:04Z
- Files changed: 14 files
- Commits: 16 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [X] New feature

## Description
<!-- Describe your changes in detail -->
- Adding support for [payU](https://developers.payu.com/en/overview.html) payment gateway
- Updated connector creation script

**Payment Method:** card, GooglePay, ApplePay
**Supported payment flows**

- [Authorize](https://developers.payu.com/en/restapi.html#creating_new_order_api)
- [Capture](https://developers.payu.com/en/restapi.html#status_u
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(connector): add payment create, sync, capture, refund, void, rsync support for PayU (#351)
Co-a
Files to modify:


**crates/api_models/src/enums.rs**
  Modify existing code

**crates/router/src/configs/settings.rs**
  Modify existing code

**crates/router/src/connector.rs**
  Add:
    - mod: pub::payu

**crates/router/src/connector/payu.rs**
  Add:
    - function: private::build_headers
    - function: private::id
    - function: private::common_get_content_type
    - function: private::base_url
    - function: private::get_auth_header
    - function: private::build_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::get_request_body
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_headers
    - function: private::get_content_type
    - function: private::get_url
    - function: private::build_request
    - function: private::handle_response
    - function: private::get_error_response
    - function: private::get_webhook_object_reference_id
    - function: private::get_webhook_event_type
    - function: private::get_webhook_resource_object
    - function: private::get_flow_type
    - struct: pub::Payu
    - impl: impl ConnectorCommonExt<Flow, Request, Response> for Payu
    - impl: impl ConnectorCommon for Payu
    - impl: impl api::Payment for Payu
    - impl: impl api::PreVerify for Payu
    - impl: impl services::ConnectorIntegration<
        api::Verify,
        types::VerifyRequestData,
        types::PaymentsResponseData,
    > for Payu
    - impl: impl api::PaymentVoid for Payu
    - impl: impl services::ConnectorIntegration<
        api::Void,
        types::PaymentsCancelData,
        types::PaymentsResponseData,
    > for Payu
    - impl: impl api::PaymentSync for Payu
    - impl: impl services::ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Payu
    - impl: impl api::PaymentCapture for Payu
    - impl: impl services::ConnectorIntegration<
        api::Capture,
        types::PaymentsCaptureData,
        types::PaymentsResponseData,
    > for Payu
    - impl: impl api::PaymentSession for Payu
    - impl: impl services::ConnectorIntegration<
        api::Session,
        types::PaymentsSessionData,
        types::PaymentsResponseData,
    > for Payu
    - impl: impl api::PaymentAuthorize for Payu
    - impl: impl services::ConnectorIntegration<
        api::Authorize,
        types::PaymentsAuthorizeData,
        types::PaymentsResponseData,
    > for Payu
    - impl: impl api::Refund for Payu
    - impl: impl api::RefundExecute for Payu
    - impl: impl api::RefundSync for Payu
    - impl: impl services::ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Payu
    - impl: impl services::ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Payu
    - impl: impl api::IncomingWebhook for Payu
    - impl: impl services::ConnectorRedirectResponse for Payu
    - mod: private::transformers

**crates/router/src/connector/payu/transformers.rs**
  Add:
    - function: private::try_from
    - function: private::try_from
    - function: private::from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::try_from
    - function: private::from
    - function: private::try_from
    - function: private::try_from
    - function: private::from
    - function: private::try_from
    - function: private::try_from
    - struct: pub::PayuPaymentsRequest
    - struct: pub::PayuPaymentMethod
    - struct: pub::PayuWallet
    - struct: pub::PayuAuthType
    - struct: pub::PayuPaymentsResponse
    - struct: pub::PayuPaymentsCaptureRequest
    - struct: pub::PayuPaymentsCaptureResponse
    - struct: pub::PayuPaymentsCancelResponse
    - struct: pub::PayuPaymentStatusData
    - struct: pub::PayuProductData
    - struct: pub::PayuOrderResponseData
    - struct: pub::PayuOrderResponseBuyerData
    - struct: pub::PayuOrderResponseProperty
    - struct: pub::PayuPaymentsSyncResponse
    - struct: pub::PayuRefundRequestData
    - struct: pub::PayuRefundRequest
    - struct: pub::PayuRefundResponseData
    - struct: pub::RefundResponse
    - struct: pub::RefundSyncResponse
    - struct: pub::PayuErrorData
    - struct: pub::PayuErrorResponse
    - enum: pub::PayuPaymentMethodData
    - enum: pub::PayuCard
    - enum: pub::PayuWalletCode
    - enum: pub::PayuPaymentStatus
    - enum: pub::OrderStatus
    - enum: pub::PayuOrderResponsePayMethod
    - enum: pub::RefundStatus
    - impl: impl TryFrom<&types::PaymentsAuthorizeRouterData> for PayuPaymentsRequest
    - impl: impl TryFrom<&types::ConnectorAuthType> for PayuAuthType
    - impl: impl From<PayuPaymentStatus> for enums::AttemptStatus
    - impl: impl TryFrom<types::ResponseRouterData<F, PayuPaymentsResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>
    - impl: impl TryFrom<&types::PaymentsCaptureRouterData> for PayuPaymentsCaptureRequest
    - impl: impl TryFrom<
        types::ResponseRouterData<F, PayuPaymentsCaptureResponse, T, types::PaymentsResponseData>,
    > for types::RouterData<F, T, types::PaymentsResponseData>
    - impl: impl TryFrom<
        types::ResponseRouterData<F, PayuPaymentsCancelResponse, T, types::PaymentsResponseData>,
    > for types::RouterData<F, T, types::PaymentsResponseData>
    - impl: impl From<OrderStatus> for enums::AttemptStatus
    - impl: impl TryFrom<types::ResponseRouterData<F, PayuPaymentsSyncResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>
    - impl: impl TryFrom<&types::RefundsRouterData<F>> for PayuRefundRequest
    - impl: impl From<RefundStatus> for enums::RefundStatus
    - impl: impl TryFrom<types::RefundsResponseRouterData<api::Execute, RefundResponse>> for types::RefundsRouterData<api::Execute>
    - impl: impl TryFrom<types::RefundsResponseRouterData<api::RSync, RefundSyncResponse>> for types::RefundsRouterData<api::RSync>

**crates/router/src/services/api.rs**
  Modify existing code

**crates/router/src/services/api/client.rs**
  Modify existing code

**crates/router/src/types/api.rs**
  Modify existing code

**crates/router/tests/connectors/connector_auth.rs**
  Modify existing code

**crates/router/tests/connectors/main.rs**
  Add:
    - mod: private::payu

**crates/router/tests/connectors/payu.rs**
  Add:
    - function: private::get_data
    - function: private::get_auth_token
    - function: private::get_name
    - function: private::should_authorize_card_payment
    - function: private::should_authorize_gpay_payment
    - function: private::should_capture_already_authorized_payment
    - function: private::should_sync_payment
    - function: private::should_void_already_authorized_payment
    - function: private::should_refund_succeeded_payment
    - function: private::should_sync_succeeded_refund_payment
    - function: private::should_fail_already_refunded_payment
    - struct: private::Payu
    - impl: impl ConnectorActions for Payu
    - impl: impl utils::Connector for Payu

**crates/router/tests/connectors/utils.rs**
  Add:
    - function: private::default
    - struct: pub::BrowserInfoType
    - impl: impl Default for BrowserInfoType