Issue:
feat(core): Payments core modification for open banking connectors

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
- Added Post-Processing flows for Open banking connectors
- Traits and and type changes
- #3758 needs to go in first


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
1. Add Plaid MCA with `payment_method` as `open_banking` and `payment_method_type` as `open_banking_pis`
```
curl --location --request POST 'http://localhost:8080/account/merchant_1720607250/connectors' \
--header 'api-key: test_admin' \
--header 'Content-Type: application/json' \
--data-raw '{
    "connector_type": "payment_processor",
    "connector_name": "plaid",
    "connector_account_details": {
        "auth_type": "BodyKey",
        "api_key": "some_key",
        "key1": "some_key"
    },
    "test_mode": false,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "open_banking",
            "payment_method_types": [
                {
                    "payment_method_type": "open_banking_pis",
                    "recurring_enabled": false,
                    "installment_payment_enabled": false,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR",
                            "GBP"
                        ]
                    }
                }
            ]
        }
    ],
    "additional_merchant_data": {
        "open_banking_recipient_data": {
            "account_data": {
                "bacs": {
                    "sort_code": "200000",
                    "account_number": "55779911",
                    "name": "merchant_name"
                }
            }
        }
    },
    "metadata": {
        "city": "NY",
        "unit": "246"
    }
}'
```
Response - 
```
{
    "connector_type": "payment_processor",
    "connector_name": "plaid",
    "connector_label": "plaid3",
    "merchant_connector_id": "mca_gVM5IWhLHFsW5q8F3uez",
    "profile_id": "pro_UgP3FfqWGhfPLuUqYtJF",
    "connector_account_details": {
        "auth_type": "BodyKey",
        "api_key": "Some_key",
        "key1": "Some_key"
    },
    "payment_methods_enabled": [
        {
            "payment_method": "open_banking",
            "payment_method_types": [
                {
                    "payment_method_type": "open_banking_pis",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR",
                            "GBP"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": false,
                    "installment_payment_enabled": false
                }
            ]
        }
    ],
    "connector_webhook_details": null,
    "metadata": {
        "city": "NY",
        "unit": "246"
    },
    "test_mode": false,
    "disabled": false,
    "frm_configs": null,
    "business_country": null,
    "business_label": null,
    "business_sub_label": null,
    "applepay_verified_domains": null,
    "pm_auth_config": null,
    "status": "active",
    "additional_merchant_data": {
        "open_banking_recipient_data": {
            "account_data": {
                "bacs": {
                    "account_number": "55779911",
                    "sort_code": "200000",
                    "name": "merchant_name",
                    "connector_recipient_id": "recipient-id-sandbox-45beb880-9e3d-4ae3-927b-052f5610fd74"
                }
            }
        }
    }
}
```


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable


Resolution:
<think>
PR Context:
- Title: feat(connector): Plaid connector Integration
- Merged: 2024-07-19T08:29:01Z
- Files changed: 26 files
- Commits: 30 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
- Integrated Plaid as a Payment connector
- #3758 and #3947 needs to go in first


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configurat
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(connector): Plaid connector Integration (#3952)
Co-authored-by: hyperswitch-bot[bot] <148525504
Files to modify:


**crates/hyperswitch_domain_models/src/router_request_types.rs**
  Modify existing code

**crates/hyperswitch_interfaces/src/configs.rs**
  Modify existing code

**crates/pm_auth/src/connector/plaid/transformers.rs**
  Modify existing code

**crates/pm_auth/src/types.rs**
  Modify existing code

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

**crates/router/src/connector/plaid.rs**
  Add:
    - function: pub::new
    - function: private::build_headers
    - function: private::id
    - function: private::get_currency_unit
    - 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::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_request_body
    - 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_webhook_object_reference_id
    - function: private::get_webhook_event_type
    - function: private::get_webhook_resource_object
    - struct: pub::Plaid
    - impl: impl Plaid
    - impl: impl api::Payment for Plaid
    - impl: impl api::PaymentSession for Plaid
    - impl: impl api::ConnectorAccessToken for Plaid
    - impl: impl api::MandateSetup for Plaid
    - impl: impl api::PaymentAuthorize for Plaid
    - impl: impl api::PaymentSync for Plaid
    - impl: impl api::PaymentCapture for Plaid
    - impl: impl api::PaymentVoid for Plaid
    - impl: impl api::Refund for Plaid
    - impl: impl api::RefundExecute for Plaid
    - impl: impl api::RefundSync for Plaid
    - impl: impl api::PaymentToken for Plaid
    - impl: impl api::PaymentsPostProcessing for Plaid
    - impl: impl ConnectorIntegration<
        api::PaymentMethodToken,
        types::PaymentMethodTokenizationData,
        types::PaymentsResponseData,
    > for Plaid
    - impl: impl ConnectorCommonExt<Flow, Request, Response> for Plaid
    - impl: impl ConnectorCommon for Plaid
    - impl: impl ConnectorValidation for Plaid
    - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Plaid
    - impl: impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken> for Plaid
    - impl: impl ConnectorIntegration<
        api::SetupMandate,
        types::SetupMandateRequestData,
        types::PaymentsResponseData,
    > for Plaid
    - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for Plaid
    - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Plaid
    - impl: impl ConnectorIntegration<
        api::PostProcessing,
        types::PaymentsPostProcessingData,
        types::PaymentsResponseData,
    > for Plaid
    - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Plaid
    - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Plaid
    - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Plaid
    - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Plaid
    - impl: impl api::IncomingWebhook for Plaid
    - mod: pub::transformers

**crates/router/src/connector/plaid/transformers.rs**
  Add:
    - 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::try_from
    - struct: pub::PlaidRouterData
    - struct: pub::PlaidPaymentsRequest
    - struct: pub::PlaidAmount
    - struct: pub::PlaidSchedule
    - struct: pub::PlaidOptions
    - struct: pub::PlaidBacs
    - struct: pub::PlaidLinkTokenRequest
    - struct: pub::User
    - struct: pub::PlaidPaymentInitiation
    - struct: pub::PlaidAuthType
    - struct: pub::PlaidPaymentsResponse
    - struct: pub::PlaidLinkTokenResponse
    - struct: pub::PlaidSyncRequest
    - struct: pub::PlaidSyncResponse
    - struct: pub::PlaidErrorResponse
    - enum: pub::PlaidPaymentStatus
    - impl: impl From<(FloatMajorUnit, T)> for PlaidRouterData<T>
    - impl: impl TryFrom<&PlaidRouterData<&types::PaymentsAuthorizeRouterData>> for PlaidPaymentsRequest
    - impl: impl TryFrom<&types::PaymentsSyncRouterData> for PlaidSyncRequest
    - impl: impl TryFrom<&types::PaymentsPostProcessingRouterData> for PlaidLinkTokenRequest
    - impl: impl TryFrom<&types::ConnectorAuthType> for PlaidAuthType
    - impl: impl From<PlaidPaymentStatus> for enums::AttemptStatus
    - impl: impl TryFrom<types::ResponseRouterData<F, PlaidPaymentsResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>
    - impl: impl TryFrom<types::ResponseRouterData<F, PlaidLinkTokenResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>
    - impl: impl TryFrom<types::ResponseRouterData<F, PlaidSyncResponse, T, types::PaymentsResponseData>> for types::RouterData<F, T, types::PaymentsResponseData>

**crates/router/src/core/admin.rs**
  Modify existing code

**crates/router/src/core/payments/connector_integration_v2_impls.rs**
  Modify existing code

**crates/router/src/core/payments/flows.rs**
  Modify existing code

**crates/router/src/core/pm_auth.rs**
  Modify existing code

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

**crates/router/src/types/domain/payments.rs**
  Modify existing code

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

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

**crates/router/tests/connectors/plaid.rs**
  Add:
    - function: private::get_data
    - function: private::get_auth_token
    - function: private::get_name
    - function: private::get_default_payment_info
    - function: private::payment_method_details
    - function: private::should_only_authorize_payment
    - function: private::should_capture_authorized_payment
    - function: private::should_partially_capture_authorized_payment
    - function: private::should_sync_authorized_payment
    - function: private::should_void_authorized_payment
    - function: private::should_refund_manually_captured_payment
    - function: private::should_partially_refund_manually_captured_payment
    - function: private::should_sync_manually_captured_refund
    - function: private::should_make_payment
    - function: private::should_sync_auto_captured_payment
    - function: private::should_refund_auto_captured_payment
    - function: private::should_partially_refund_succeeded_payment
    - function: private::should_refund_succeeded_payment_multiple_times
    - function: private::should_sync_refund
    - function: private::should_fail_payment_for_incorrect_cvc
    - function: private::should_fail_payment_for_invalid_exp_month
    - function: private::should_fail_payment_for_incorrect_expiry_year
    - function: private::should_fail_void_payment_for_auto_capture
    - function: private::should_fail_capture_for_invalid_payment
    - function: private::should_fail_for_refund_amount_higher_than_payment_amount
    - struct: private::PlaidTest
    - impl: impl ConnectorActions for PlaidTest
    - impl: impl Connector for PlaidTest

**crates/test_utils/src/connector_auth.rs**
  Modify existing code