Bug: refactor(constraint_graph): add cypress test cases for 'mandate_details'




diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs
index 13575961108..0ca77f3a5ee 100644
--- a/crates/router/src/core/payment_methods/cards.rs
+++ b/crates/router/src/core/payment_methods/cards.rs
@@ -4589,7 +4589,7 @@ pub async fn filter_payment_methods(
                                     .map(|future_usage| {
                                         future_usage == common_enums::FutureUsage::OnSession
                                     })
-                                    .unwrap_or(false)
+                                    .unwrap_or(true)
                         })
                         .and_then(|res| {
                             res.then(|| {

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
This will handel the cases for constraint_graph for PML where setup_future_usage is not passed in payments.

### 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)?
-->
This can be tested in the following way:
1. Connector create (Fiuu)
```
curl --location 'http://127.0.0.1:8080/account/merchant_1733312955/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
    "connector_type": "payment_processor",
    "connector_name": "fiuu",
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_key": ".....",
        "key1": "......",
        "api_secret": "......"
    },
    "test_mode": false,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        }
    ],
    "connector_webhook_details": {
        "merchant_secret": ".....",
        "additional_secret": null
    }
}'
```

2. Payment (no setup_future_usage)
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Cookie;' \
--header 'api-key: .....' \
--data-raw '{
    "amount": 6540,
   // "setup_future_usage": "off_session",
    "currency": "EUR",
    "confirm": false,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "uiuiuiui",
    "email": "guest@ehjhjxample.com",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "NL",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "IN",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
```

3. List payment methods (`setup_future_usage` = null)
```
curl --location 'http://localhost:8080/account/payment_methods?client_secret=......' \
--header 'Accept: application/json' \
--header 'api-key: .....' \
--data ''
```

Response
```
{
    "redirect_url": "https://google.com/success",
    "currency": "MYR",
    "payment_methods": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "bank_names": [
                        {
                            "bank_name": [
                                "affin_bank",
                                "bank_islam",
                                "rhb_bank",
                                "bank_of_china",
                                "bank_simpanan_nasional",
                                "bank_muamalat",
                                "bank_rakyat",
                                "maybank",
                                "public_bank",
                                "uob_bank",
                                "hong_leong_bank",
                                "hsbc_bank",
                                "ocbc_bank",
                                "alliance_bank",
                                "agro_bank",
                                "cimb_bank",
                                "kuwait_finance_house",
                                "am_bank",
                                "standard_chartered_bank"
                            ],
                            "eligible_connectors": [
                                "fiuu"
                            ]
                        }
                    ],
                    "bank_debits": null,
                    "bank_transfers": null,
                    "required_fields": null,
                    "surcharge_details": null,
                    "pm_auth_connector": null
                }
            ]
        }
    ],
    "mandate_payment": null,
    "merchant_name": "Prajjwal",
    "show_surcharge_breakup_screen": false,
    "payment_type": "normal",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
}
```

4. `setup_future_usage` = `on_session`
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: xxxxxx' \
--data '{
    "amount": 1000,
    "currency": "MYR",
    "amount_to_capture": 1000,
    "confirm": false,
    "payment_link" : true,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "setup_future_usage": "on_session",
    "payment_method_type": "online_banking_fpx",
    "return_url": "https://google.com",
    "payment_method_data": {
        "bank_redirect": {
            "online_banking_fpx": {
                "issuer": "bank_islam"
            }
        }
    }
}'
```

List PM response:
```
{
    "redirect_url": "https://google.com/success",
    "currency": "MYR",
    "payment_methods": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "bank_names": [
                        {
                            "bank_name": [
                                "ocbc_bank",
                                "uob_bank",
                                "kuwait_finance_house",
                                "standard_chartered_bank",
                                "cimb_bank",
                                "bank_simpanan_nasional",
                                "hsbc_bank",
                                "bank_rakyat",
                                "alliance_bank",
                                "am_bank",
                                "public_bank",
                                "rhb_bank",
                                "agro_bank",
                                "hong_leong_bank",
                                "bank_of_china",
                                "maybank",
                                "affin_bank",
                                "bank_muamalat",
                                "bank_islam"
                            ],
                            "eligible_connectors": [
                                "fiuu"
                            ]
                        }
                    ],
                    "bank_debits": null,
                    "bank_transfers": null,
                    "required_fields": null,
                    "surcharge_details": null,
                    "pm_auth_connector": null
                }
            ]
        }
    ],
    "mandate_payment": null,
    "merchant_name": "Prajjwal",
    "show_surcharge_breakup_screen": false,
    "payment_type": "normal",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
}
```

5. `setup_future_usage` = off_session
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: xxxxx' \
--data '{
    "amount": 1000,
    "currency": "MYR",
    "amount_to_capture": 1000,
    "confirm": false,
    "payment_link" : true,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "setup_future_usage": "off_session",
    "payment_method_type": "online_banking_fpx",
    "return_url": "https://google.com",
    "payment_method_data": {
        "bank_redirect": {
            "online_banking_fpx": {
                "issuer": "bank_islam"
            }
        }
    }
}'
```
List PM response:
```
{
    "redirect_url": "https://google.com/success",
    "currency": "MYR",
    "payment_methods": [],
    "mandate_payment": null,
    "merchant_name": "Prajjwal",
    "show_surcharge_breakup_screen": false,
    "payment_type": "new_mandate",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
}
```


## 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`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible


This can be tested in the following way:
1. Connector create (Fiuu)
```
curl --location 'http://127.0.0.1:8080/account/merchant_1733312955/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
    "connector_type": "payment_processor",
    "connector_name": "fiuu",
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_key": ".....",
        "key1": "......",
        "api_secret": "......"
    },
    "test_mode": false,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        }
    ],
    "connector_webhook_details": {
        "merchant_secret": ".....",
        "additional_secret": null
    }
}'
```

2. Payment (no setup_future_usage)
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Cookie;' \
--header 'api-key: .....' \
--data-raw '{
    "amount": 6540,
   // "setup_future_usage": "off_session",
    "currency": "EUR",
    "confirm": false,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "uiuiuiui",
    "email": "guest@ehjhjxample.com",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "NL",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "example@example.com"
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "IN",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
```

3. List payment methods (`setup_future_usage` = null)
```
curl --location 'http://localhost:8080/account/payment_methods?client_secret=......' \
--header 'Accept: application/json' \
--header 'api-key: .....' \
--data ''
```

Response
```
{
    "redirect_url": "https://google.com/success",
    "currency": "MYR",
    "payment_methods": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "bank_names": [
                        {
                            "bank_name": [
                                "affin_bank",
                                "bank_islam",
                                "rhb_bank",
                                "bank_of_china",
                                "bank_simpanan_nasional",
                                "bank_muamalat",
                                "bank_rakyat",
                                "maybank",
                                "public_bank",
                                "uob_bank",
                                "hong_leong_bank",
                                "hsbc_bank",
                                "ocbc_bank",
                                "alliance_bank",
                                "agro_bank",
                                "cimb_bank",
                                "kuwait_finance_house",
                                "am_bank",
                                "standard_chartered_bank"
                            ],
                            "eligible_connectors": [
                                "fiuu"
                            ]
                        }
                    ],
                    "bank_debits": null,
                    "bank_transfers": null,
                    "required_fields": null,
                    "surcharge_details": null,
                    "pm_auth_connector": null
                }
            ]
        }
    ],
    "mandate_payment": null,
    "merchant_name": "Prajjwal",
    "show_surcharge_breakup_screen": false,
    "payment_type": "normal",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
}
```

4. `setup_future_usage` = `on_session`
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: xxxxxx' \
--data '{
    "amount": 1000,
    "currency": "MYR",
    "amount_to_capture": 1000,
    "confirm": false,
    "payment_link" : true,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "setup_future_usage": "on_session",
    "payment_method_type": "online_banking_fpx",
    "return_url": "https://google.com",
    "payment_method_data": {
        "bank_redirect": {
            "online_banking_fpx": {
                "issuer": "bank_islam"
            }
        }
    }
}'
```

List PM response:
```
{
    "redirect_url": "https://google.com/success",
    "currency": "MYR",
    "payment_methods": [
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "bank_names": [
                        {
                            "bank_name": [
                                "ocbc_bank",
                                "uob_bank",
                                "kuwait_finance_house",
                                "standard_chartered_bank",
                                "cimb_bank",
                                "bank_simpanan_nasional",
                                "hsbc_bank",
                                "bank_rakyat",
                                "alliance_bank",
                                "am_bank",
                                "public_bank",
                                "rhb_bank",
                                "agro_bank",
                                "hong_leong_bank",
                                "bank_of_china",
                                "maybank",
                                "affin_bank",
                                "bank_muamalat",
                                "bank_islam"
                            ],
                            "eligible_connectors": [
                                "fiuu"
                            ]
                        }
                    ],
                    "bank_debits": null,
                    "bank_transfers": null,
                    "required_fields": null,
                    "surcharge_details": null,
                    "pm_auth_connector": null
                }
            ]
        }
    ],
    "mandate_payment": null,
    "merchant_name": "Prajjwal",
    "show_surcharge_breakup_screen": false,
    "payment_type": "normal",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
}
```

5. `setup_future_usage` = off_session
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: xxxxx' \
--data '{
    "amount": 1000,
    "currency": "MYR",
    "amount_to_capture": 1000,
    "confirm": false,
    "payment_link" : true,
    "capture_method": "automatic",
    "payment_method": "bank_redirect",
    "setup_future_usage": "off_session",
    "payment_method_type": "online_banking_fpx",
    "return_url": "https://google.com",
    "payment_method_data": {
        "bank_redirect": {
            "online_banking_fpx": {
                "issuer": "bank_islam"
            }
        }
    }
}'
```
List PM response:
```
{
    "redirect_url": "https://google.com/success",
    "currency": "MYR",
    "payment_methods": [],
    "mandate_payment": null,
    "merchant_name": "Prajjwal",
    "show_surcharge_breakup_screen": false,
    "payment_type": "new_mandate",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false,
    "is_tax_calculation_enabled": false
}
```
