Issue:
feat(mca): Added recipient connector call 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 connector call in payment connector create to facilitate merchant recipient creation at connector end.
- Added alternative locker call for creation of recipient at Hyperswitch's end in case the connector does not support it.
- Added validation for merchant bank account data


### Additional Changes

- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [x] 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. Create an MCA account with `connector_type` as `payment_processor` and an open banking connector
```
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_label": "plaid3",
    "connector_account_details": {
        "auth_type": "BodyKey",
        "api_key": "Some_key",
        "key1": "Some_key"
    },
    "test_mode": false,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "eps",
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    }
                },
                {
                    "payment_method_type": "giropay",
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    }
                },
                {
                    "payment_method_type": "ideal",
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    }
                }
            ]
        },
        {
            "payment_method": "bank_debit",
            "payment_method_types": [
                {
                    "payment_method_type": "ach",
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "minimum_amount": 0,
                    "maximum_amount": 10000
                }
            ]
        },
        {
            "payment_method": "wallet",
            "payment_method_types": [
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "invoke_sdk_client",
                    "card_networks": null,
                    "accepted_countries": null,
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "USD",
                            "GBP",
                            "CAD",
                            "AUD",
                            "EUR"
                        ]
                    }
                }
            ]
        }
    ],
    "additional_merchant_data": {
         "open_banking_recipient_data": {
            "account_data": {
                "bacs": {
                    "sort_code": "200000",
                    "account_number": "55779911",
                    "name": "merchant_name"
                }
            }
        }
    },
    "metadata": {
        "city": "NY",
        "unit": "246"
    }
}'
```
Successful Response should look like this - 
```
{
    "connector_type": "payment_processor",
    "connector_name": "plaid",
    "connector_label": "plaid3",
    "merchant_connector_id": "mca_c0iTEayEJMViYwEhTCOG",
    "profile_id": "pro_UgP3FfqWGhfPLuUqYtJF",
    "connector_account_details": {
        "auth_type": "BodyKey",
      "api_key": "Some_key",
        "key1": "Some_key"
    },
    "payment_methods_enabled": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "eps",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "giropay",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "ideal",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        },
        {
            "payment_method": "bank_debit",
            "payment_method_types": [
                {
                    "payment_method_type": "ach",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 10000,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        },
        {
            "payment_method": "wallet",
            "payment_method_types": [
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "invoke_sdk_client",
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "USD",
                            "GBP",
                            "CAD",
                            "AUD",
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ],
    "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"
                }
            }
        }
    }
}
```
Response when the connector does not support recipient creation (locker call to be made in this)
```
{
    "connector_type": "payment_processor",
    "connector_name": "plaid",
    "connector_label": "plaid3",
    "merchant_connector_id": "mca_6bIUIrWNSbqssRO89Zxx",
    "profile_id": "pro_UgP3FfqWGhfPLuUqYtJF",
    "connector_account_details": {
        "auth_type": "BodyKey",
       "api_key": "Some_key",
        "key1": "Some_key"
    },
    "payment_methods_enabled": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "eps",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "giropay",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                },
                {
                    "payment_method_type": "ideal",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": null,
                    "maximum_amount": null,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        },
        {
            "payment_method": "bank_debit",
            "payment_method_types": [
                {
                    "payment_method_type": "ach",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 10000,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        },
        {
            "payment_method": "wallet",
            "payment_method_types": [
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "invoke_sdk_client",
                    "card_networks": null,
                    "accepted_currencies": {
                        "type": "enable_only",
                        "list": [
                            "USD",
                            "GBP",
                            "CAD",
                            "AUD",
                            "EUR"
                        ]
                    },
                    "accepted_countries": null,
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ],
    "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"
                }
            }
        }
    }
}
```


## 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(core): Payments core modification for open banking connectors
- Merged: 2024-07-17T09:53:18Z
- Files changed: 30 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 -->
- 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
- [ ] Th
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(core): Payments core modification for open banking connectors (#3947)
Co-authored-by: hyperswit
Files to modify:


**crates/api_models/src/payments.rs**
  Add:
    - function: private::get_payment_method_type
    - enum: pub::OpenBankingData
    - impl: impl GetPaymentMethodType for OpenBankingData

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

**crates/common_enums/src/transformers.rs**
  Modify existing code

**crates/connector_configs/src/response_modifier.rs**
  Modify existing code

**crates/connector_configs/src/transformer.rs**
  Modify existing code

**crates/euclid/src/dssa/graph.rs**
  Modify existing code

**crates/euclid/src/frontend/ast/lowering.rs**
  Modify existing code

**crates/euclid/src/frontend/dir.rs**
  Modify existing code

**crates/euclid/src/frontend/dir/enums.rs**
  Add:
    - enum: pub::OpenBankingType

**crates/euclid/src/frontend/dir/lowering.rs**
  Add:
    - function: private::from
    - impl: impl From<enums::OpenBankingType> for global_enums::PaymentMethodType

**crates/euclid/src/frontend/dir/transformers.rs**
  Modify existing code

**crates/euclid_wasm/src/lib.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/payment_method_data.rs**
  Add:
    - enum: pub::OpenBankingData

**crates/hyperswitch_domain_models/src/router_flow_types/payments.rs**
  Add:
    - struct: pub::PostProcessing

**crates/hyperswitch_domain_models/src/router_request_types.rs**
  Add:
    - function: private::try_from
    - struct: pub::PaymentsPostProcessingData
    - impl: impl TryFrom<RouterData<F, PaymentsAuthorizeData, response_types::PaymentsResponseData>> for PaymentsPostProcessingData

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

**crates/kgraph_utils/src/mca.rs**
  Modify existing code

**crates/kgraph_utils/src/transformers.rs**
  Modify existing code

**crates/openapi/src/openapi.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/payment_intents/types.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/setup_intents/types.rs**
  Modify existing code

**crates/router/src/connector/aci/transformers.rs**
  Modify existing code

**crates/router/src/connector/adyen.rs**
  Modify existing code

**crates/router/src/connector/adyen/transformers.rs**
  Modify existing code

**crates/router/src/connector/airwallex/transformers.rs**
  Modify existing code

**crates/router/src/connector/authorizedotnet/transformers.rs**
  Modify existing code

**crates/router/src/connector/bambora/transformers.rs**
  Modify existing code

**crates/router/src/connector/bankofamerica/transformers.rs**
  Modify existing code

**crates/router/src/connector/billwerk/transformers.rs**
  Modify existing code

**crates/router/src/connector/bluesnap/transformers.rs**
  Modify existing code

**crates/router/src/connector/boku/transformers.rs**
  Modify existing code

**crates/router/src/connector/braintree/braintree_graphql_transformers.rs**
  Modify existing code

**crates/router/src/connector/braintree/transformers.rs**
  Modify existing code

**crates/router/src/connector/checkout/transformers.rs**
  Modify existing code

**crates/router/src/connector/cryptopay/transformers.rs**
  Modify existing code

**crates/router/src/connector/cybersource/transformers.rs**
  Modify existing code

**crates/router/src/connector/datatrans/transformers.rs**
  Modify existing code

**crates/router/src/connector/dlocal/transformers.rs**
  Modify existing code

**crates/router/src/connector/fiserv/transformers.rs**
  Modify existing code

**crates/router/src/connector/forte/transformers.rs**
  Modify existing code

**crates/router/src/connector/globepay/transformers.rs**
  Modify existing code

**crates/router/src/connector/gocardless/transformers.rs**
  Modify existing code

**crates/router/src/connector/helcim/transformers.rs**
  Modify existing code

**crates/router/src/connector/iatapay/transformers.rs**
  Modify existing code

**crates/router/src/connector/klarna.rs**
  Modify existing code

**crates/router/src/connector/mifinity/transformers.rs**
  Modify existing code

**crates/router/src/connector/multisafepay/transformers.rs**
  Modify existing code

**crates/router/src/connector/nexinets/transformers.rs**
  Modify existing code

**crates/router/src/connector/nmi/transformers.rs**
  Modify existing code

**crates/router/src/connector/noon/transformers.rs**
  Modify existing code

**crates/router/src/connector/nuvei/transformers.rs**
  Modify existing code

**crates/router/src/connector/opayo/transformers.rs**
  Modify existing code

**crates/router/src/connector/payeezy/transformers.rs**
  Modify existing code

**crates/router/src/connector/payme/transformers.rs**
  Modify existing code

**crates/router/src/connector/paypal/transformers.rs**
  Modify existing code

**crates/router/src/connector/placetopay/transformers.rs**
  Modify existing code

**crates/router/src/connector/powertranz/transformers.rs**
  Modify existing code

**crates/router/src/connector/razorpay/transformers.rs**
  Modify existing code

**crates/router/src/connector/shift4/transformers.rs**
  Modify existing code

**crates/router/src/connector/square/transformers.rs**
  Modify existing code

**crates/router/src/connector/stax/transformers.rs**
  Modify existing code

**crates/router/src/connector/stripe/transformers.rs**
  Modify existing code

**crates/router/src/connector/trustpay/transformers.rs**
  Modify existing code

**crates/router/src/connector/tsys/transformers.rs**
  Modify existing code

**crates/router/src/connector/utils.rs**
  Modify existing code

**crates/router/src/connector/volt/transformers.rs**
  Modify existing code

**crates/router/src/connector/worldline/transformers.rs**
  Modify existing code

**crates/router/src/connector/worldpay/transformers.rs**
  Modify existing code

**crates/router/src/connector/zen/transformers.rs**
  Modify existing code

**crates/router/src/connector/zsl/transformers.rs**
  Modify existing code

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

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

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

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

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

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

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

**crates/router/src/core/payments/connector_integration_v2_impls.rs**
  Add:
    - impl: impl api::PaymentsPostProcessingV2 for connector::DummyConnector<T>
    - impl: impl services::ConnectorIntegrationV2<
            api::PostProcessing,
            types::PaymentFlowData,
            types::PaymentsPostProcessingData,
            types::PaymentsResponseData,
        > for connector::DummyConnector<T>
    - impl: impl api::PaymentsPostProcessingV2 for $connector
    - impl: impl services::ConnectorIntegrationV2<
            api::PostProcessing,
            types::PaymentFlowData,
                types::PaymentsPostProcessingData,
                types::PaymentsResponseData,
            > for $connector

**crates/router/src/core/payments/flows.rs**
  Add:
    - function: private::postprocessing_steps
    - impl: impl api::PaymentsPostProcessing for connector::DummyConnector<T>
    - impl: impl services::ConnectorIntegration<
        api::PostProcessing,
        types::PaymentsPostProcessingData,
        types::PaymentsResponseData,
    > for connector::DummyConnector<T>

**crates/router/src/core/payments/flows/approve_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/authorize_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data
    - function: private::postprocessing_steps
    - function: pub::authorize_postprocessing_steps

**crates/router/src/core/payments/flows/cancel_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/capture_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/complete_authorize_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/incremental_authorization_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/psync_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/reject_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/session_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/flows/setup_mandate_flow.rs**
  Add:
    - function: private::get_merchant_recipient_data

**crates/router/src/core/payments/helpers.rs**
  Add:
    - function: pub::get_additional_merchant_data
    - function: pub::get_recipient_id_for_open_banking

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

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

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

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

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

**crates/router/src/types/api/payments.rs**
  Add:
    - trait: pub::PaymentsPostProcessing

**crates/router/src/types/api/payments_v2.rs**
  Add:
    - trait: pub::PaymentsPostProcessingV2

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

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

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