Bug: [FIX] consider status of payment method before filtering wallets in list pm




diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs
index 164c0e9557a..deae78b5540 100644
--- a/crates/router/src/core/payment_methods/cards.rs
+++ b/crates/router/src/core/payment_methods/cards.rs
@@ -3470,12 +3470,14 @@ pub async fn list_payment_methods(
                 .any(|mca| mca.payment_method == enums::PaymentMethod::Wallet);
             if wallet_pm_exists {
                 match db
-                    .find_payment_method_by_customer_id_merchant_id_list(
+                    .find_payment_method_by_customer_id_merchant_id_status(
                         &((&state).into()),
                         &key_store,
-                       &customer.customer_id,
-                       merchant_account.get_id(),
+                        &customer.customer_id,
+                        merchant_account.get_id(),
+                        common_enums::PaymentMethodStatus::Active,
                         None,
+                        merchant_account.storage_scheme,
                     )
                     .await
                 {


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

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

## Description
<!-- Describe your changes in detail -->
https://github.com/juspay/hyperswitch/pull/3953
We were not considering the status of payment method in above filtering logic

### 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. Create merchant_account, api_key, mca (with any wallet)
2. Create a payment with wallet as payment method with authentication_type as three_ds. Retain the status of payment as processing

```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_qVglrYUpCaoLCvnixZd3hX0ls7du5ZmaVMhZJNGt8ezEN4Axn8oU22i2gRz0OTqx' \
--data '{
    "amount": 6540,
    "confirm": true,
    "currency": "USD",
    "customer_acceptance": {
        "acceptance_type": "online"
    },
    "customer_id": "cus_kWEMsP0NufHyhHsBB1Ol",
    "profile_id": "pro_mjcaEelE0mjdp8ODpfkc",
    "authentication_type": "three_ds",
    "payment_method": "wallet",
    "payment_method_type": "apple_pay",
    "payment_method_data": {
        "wallet": {
            "apple_pay": {
                "payment_data": "token",
                "payment_method": {
                    "display_name": "Visa 0326",
                    "network": "Mastercard",
                    "type": "debit"
                },
                "transaction_identifier": "55CC32D7BF7890B9064433F15B9F23F849CF84AFD01E4E65DD8ADE306300E9D8"
            }
        }
    }
}'
```
3. Create another payment with confirm:false

```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_qVglrYUpCaoLCvnixZd3hX0ls7du5ZmaVMhZJNGt8ezEN4Axn8oU22i2gRz0OTqx' \
--data '{
    "amount": 6540,
    "confirm": false,
    "currency": "USD",
    "customer_acceptance": {
        "acceptance_type": "online"
    },
    "customer_id": "cus_kWEMsP0NufHyhHsBB1Ol",
    "profile_id": "pro_mjcaEelE0mjdp8ODpfkc",
    "authentication_type": "three_ds"
}'
```

4. list merchant pml. When the status of payment_method is inactive in db, the wallet should appear in the list

```
curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_Fvjj9zQjd2BA47M6qFJO_secret_gV3eKHcXxHT9PdA7fBbk' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_c079bd1ada67401fb98568ea6f6043bf' \
--data '' "
```

## 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
