Bug: [BUG] `payment_method_id` is not being stored in `payment_methods` table



### Bug Description

`payment_mehod_id` that is created at the time of creating a PaymentMethod is not being stored in `payment_methods` table. This results in database error showing 404 during update and 500 when trying to delete `payment_method_id` from the database.

### Expected Behavior

`payment_method_id` is expected to be stored in the `payment_methods` database. 

### Actual Behavior

It doesn't exist.

### Steps To Reproduce

Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'


### Context For The Bug

Locally:
Not being stored in Local.
<img width="526" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/746e9c3b-a1fc-401c-82a7-63eac958e86f">
<img width="526" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/9895af03-d87a-48ec-8ad4-420237a9c198">

Integ:
Not in Integ as well.
<img width="526" alt="image" src="https://github.com/juspay/hyperswitch/assets/69745008/3faf5c3d-366b-482b-a2b3-ff8342eafebf">


### Environment

Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the `x-request-id` response header for helping us debug your issue.

If not (or if building/running locally), please provide the following details:
1. Operating System or Linux distribution:
2. Rust version (output of `rustc --version`): ``
3. App version (output of `cargo r --features vergen -- --version`): ``


### Have you spent some time to check if this bug has been raised before?

- [X] I checked and didn't find similar issue

### Have you read the Contributing Guidelines?

- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

Yes I am willing to submit a PR!
diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs
index 5020c877bae..8d7c228df4a 100644
--- a/crates/router/src/core/payment_methods/cards.rs
+++ b/crates/router/src/core/payment_methods/cards.rs
@@ -86,20 +86,26 @@ pub async fn add_payment_method(
     let merchant_id = &merchant_account.merchant_id;
     let customer_id = req.customer_id.clone().get_required_value("customer_id")?;
     let response = match req.card.clone() {
-        Some(card) => add_card_to_locker(state, req, card, customer_id, merchant_account)
-            .await
-            .change_context(errors::ApiErrorResponse::InternalServerError)
-            .attach_printable("Add Card Failed"),
+        Some(card) => add_card_to_locker(
+            state,
+            req.clone(),
+            card,
+            customer_id.clone(),
+            merchant_account,
+        )
+        .await
+        .change_context(errors::ApiErrorResponse::InternalServerError)
+        .attach_printable("Add Card Failed"),
         None => {
             let pm_id = generate_id(consts::ID_LENGTH, "pm");
             let payment_method_response = api::PaymentMethodResponse {
                 merchant_id: merchant_id.to_string(),
-                customer_id: Some(customer_id),
+                customer_id: Some(customer_id.clone()),
                 payment_method_id: pm_id,
                 payment_method: req.payment_method,
                 payment_method_type: req.payment_method_type,
                 card: None,
-                metadata: req.metadata,
+                metadata: req.metadata.clone(),
                 created: Some(common_utils::date_time::now()),
                 recurring_enabled: false,           //[#219]
                 installment_payment_enabled: false, //[#219]
@@ -108,7 +114,24 @@ pub async fn add_payment_method(
             Ok((payment_method_response, false))
         }
     };
-    Ok(response?.0).map(services::ApplicationResponse::Json)
+
+    let (resp, is_duplicate) = response?;
+    if !is_duplicate {
+        let pm_metadata = resp.metadata.as_ref().map(|data| data.peek());
+        create_payment_method(
+            &*state.store,
+            &req,
+            &customer_id,
+            &resp.payment_method_id,
+            &resp.merchant_id,
+            pm_metadata.cloned(),
+        )
+        .await
+        .change_context(errors::ApiErrorResponse::InternalServerError)
+        .attach_printable("Failed to save Payment Method")?;
+    }
+
+    Ok(resp).map(services::ApplicationResponse::Json)
 }
 
 #[instrument(skip_all)]

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

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

## Description
<!-- Describe your changes in detail -->
Currently, payment method create API does not insert payment method record in the Db. 
have added the db call to insert the record if not already present.


### 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 its 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)?
-->
<img width="1512" alt="image" src="https://github.com/juspay/hyperswitch/assets/76486416/29b8d829-367f-4a6a-a84b-4a4e3b35fd6b">

<img width="1495" alt="image" src="https://github.com/juspay/hyperswitch/assets/76486416/ff9e8311-eef7-4beb-9813-60534b216b60">

<img width="1507" alt="image" src="https://github.com/juspay/hyperswitch/assets/76486416/70e42034-66b5-4a00-a703-7fafc8653cdf">




## 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 submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
