Bug: skip 3DS in `network_transaction_id` flow for cybersource



During the MIT with cybersource connector we check if the connector mandate details are present. If is present then we make a no_three_ds api request. Same check needs to be added in case of network transaction id flow as MIT can be done using card details and network transaction id as well.

As this check is not present threeds is triggered even during MITs with card details and network transaction id.
diff --git a/crates/router/src/connector/cybersource.rs b/crates/router/src/connector/cybersource.rs
index 15242ddb119..806cf67b2da 100644
--- a/crates/router/src/connector/cybersource.rs
+++ b/crates/router/src/connector/cybersource.rs
@@ -901,7 +901,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
     ) -> CustomResult<String, errors::ConnectorError> {
         if req.is_three_ds()
             && req.request.is_card()
-            && req.request.connector_mandate_id().is_none()
+            && (req.request.connector_mandate_id().is_none()
+                && req.request.get_optional_network_transaction_id().is_none())
             && req.request.authentication_data.is_none()
         {
             Ok(format!(
@@ -929,7 +930,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
         ))?;
         if req.is_three_ds()
             && req.request.is_card()
-            && req.request.connector_mandate_id().is_none()
+            && (req.request.connector_mandate_id().is_none()
+                && req.request.get_optional_network_transaction_id().is_none())
             && req.request.authentication_data.is_none()
         {
             let connector_req =
@@ -970,7 +972,8 @@ impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::P
     ) -> CustomResult<types::PaymentsAuthorizeRouterData, errors::ConnectorError> {
         if data.is_three_ds()
             && data.request.is_card()
-            && data.request.connector_mandate_id().is_none()
+            && (data.request.connector_mandate_id().is_none()
+                && data.request.get_optional_network_transaction_id().is_none())
             && data.request.authentication_data.is_none()
         {
             let response: cybersource::CybersourceAuthSetupResponse = res
diff --git a/crates/router/src/connector/cybersource/transformers.rs b/crates/router/src/connector/cybersource/transformers.rs
index 2375dd578b3..d1f15082ee3 100644
--- a/crates/router/src/connector/cybersource/transformers.rs
+++ b/crates/router/src/connector/cybersource/transformers.rs
@@ -1043,12 +1043,23 @@ impl
             Err(_) => None,
         };
 
+        let security_code = if item
+            .router_data
+            .request
+            .get_optional_network_transaction_id()
+            .is_some()
+        {
+            None
+        } else {
+            Some(ccard.card_cvc)
+        };
+
         let payment_information = PaymentInformation::Cards(Box::new(CardPaymentInformation {
             card: Card {
                 number: ccard.card_number,
                 expiration_month: ccard.card_exp_month,
                 expiration_year: ccard.card_exp_year,
-                security_code: Some(ccard.card_cvc),
+                security_code,
                 card_type: card_type.clone(),
             },
         }));
diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs
index d5c01503ed8..f8eed11d161 100644
--- a/crates/router/src/connector/utils.rs
+++ b/crates/router/src/connector/utils.rs
@@ -763,6 +763,7 @@ pub trait PaymentsAuthorizeRequestData {
     fn get_card(&self) -> Result<domain::Card, Error>;
     fn get_return_url(&self) -> Result<String, Error>;
     fn connector_mandate_id(&self) -> Option<String>;
+    fn get_optional_network_transaction_id(&self) -> Option<String>;
     fn is_mandate_payment(&self) -> bool;
     fn is_customer_initiated_mandate_payment(&self) -> bool;
     fn get_webhook_url(&self) -> Result<String, Error>;
@@ -843,6 +844,18 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData {
                 Some(payments::MandateReferenceId::NetworkMandateId(_)) | None => None,
             })
     }
+
+    fn get_optional_network_transaction_id(&self) -> Option<String> {
+        self.mandate_id
+            .as_ref()
+            .and_then(|mandate_ids| match &mandate_ids.mandate_reference_id {
+                Some(payments::MandateReferenceId::NetworkMandateId(network_transaction_id)) => {
+                    Some(network_transaction_id.clone())
+                }
+                Some(payments::MandateReferenceId::ConnectorMandateId(_)) | None => None,
+            })
+    }
+
     fn is_mandate_payment(&self) -> bool {
         ((self.customer_acceptance.is_some() || self.setup_mandate_details.is_some())
             && self.setup_future_usage.map_or(false, |setup_future_usage| {

## 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 -->
During the MIT with cybersource connector we check if the connector mandate details are present. If is present then we make a no_three_ds api request. Same check needs to be added in case of network transaction id flow as MIT can be done using card details and network transaction id as well.

As this check is not present threeds is triggered even during MITs with card details and network transaction id.

### 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)?
-->
-> Create mca of cybersource  
-> enable the `is_connector_agnostic_mit_enabled` config
```
curl --location 'http://localhost:8080/account/merchant_1725355756/business_profile/pro_jQJ4qqk9cMEsOfzx4jjP' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:' \
--data '{
    "is_connector_agnostic_mit_enabled": true
}'
```
```
{
    "merchant_id": "merchant_1725355756",
    "profile_id": "pro_jQJ4qqk9cMEsOfzx4jjP",
    "profile_name": "US_default",
    "return_url": "https://google.com/success",
    "enable_payment_response_hash": true,
    "payment_response_hash_key": "BKfZiBAT1keoPmkDRu4lyN2hAS4hKh1Uv79ydDs32kDCLrbTV5U7Xp9ZuuTgYgrp",
    "redirect_to_merchant_with_http_post": false,
    "webhook_details": {
        "webhook_version": "1.0.1",
        "webhook_username": "ekart_retail",
        "webhook_password": "password_ekart@123",
        "webhook_url": null,
        "payment_created_enabled": true,
        "payment_succeeded_enabled": true,
        "payment_failed_enabled": true
    },
    "metadata": null,
    "routing_algorithm": null,
    "intent_fulfillment_time": 900,
    "frm_routing_algorithm": null,
    "payout_routing_algorithm": null,
    "applepay_verified_domains": null,
    "session_expiry": 900,
    "payment_link_config": null,
    "authentication_connector_details": null,
    "use_billing_as_payment_method_billing": true,
    "extended_card_info_config": null,
    "collect_shipping_details_from_wallet_connector": false,
    "collect_billing_details_from_wallet_connector": false,
    "always_collect_shipping_details_from_wallet_connector": false,
    "always_collect_billing_details_from_wallet_connector": false,
    "is_connector_agnostic_mit_enabled": true,
    "payout_link_config": null,
    "outgoing_webhook_custom_http_headers": null,
    "tax_connector_id": null,
    "is_tax_connector_enabled": false
}
```

-> Create a payment with `"setup_future_usage": "off_session"` and `"authentication_type": "three_ds"`
```
{
    "amount": 1000,
    "currency": "USD",
    "confirm": true,
    
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "cu_{{$timestamp}}",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "5454545454545454",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "name name",
            "card_cvc": "737"
        }
    },
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX",
            "last_name": "ss"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "125.0.0.1"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {},
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 0,
            "account_name": "transaction_processing"
        }
    ]
}
```
```
{
    "payment_id": "pay_rsLVCXS2Q8uTBPdF4P1j",
    "merchant_id": "merchant_1725355756",
    "status": "requires_customer_action",
    "amount": 1000,
    "net_amount": 1000,
    "amount_capturable": 1000,
    "amount_received": null,
    "connector": "cybersource",
    "client_secret": "pay_rsLVCXS2Q8uTBPdF4P1j_secret_z1CCqBhaQSvZPuiWogkN",
    "created": "2024-09-03T09:37:00.475Z",
    "currency": "USD",
    "customer_id": "cu_1725356220",
    "customer": {
        "id": "cu_1725356220",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "5454",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "545454",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": null,
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_WoDIt3orfsK8JrDJVLoA",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": "ss"
        },
        "phone": null,
        "email": null
    },
    "order_details": [
        {
            "brand": null,
            "amount": 0,
            "category": null,
            "quantity": 1,
            "product_id": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "product_img_link": null,
            "requires_shipping": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_rsLVCXS2Q8uTBPdF4P1j/merchant_1725355756/pay_rsLVCXS2Q8uTBPdF4P1j_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "cu_1725356220",
        "created_at": 1725356220,
        "expires": 1725359820,
        "secret": "epk_256f65862c0b4553b26432c036b4f748"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": {},
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_rsLVCXS2Q8uTBPdF4P1j_1",
    "payment_link": null,
    "profile_id": "pro_jQJ4qqk9cMEsOfzx4jjP",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_1jo1uMz1tfWZk0FydFQQ",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-03T09:52:00.475Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "125.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_method_id": "pm_rr5fO13rR1AEOearzGCl",
    "payment_method_status": null,
    "updated": "2024-09-03T09:37:02.019Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```
-> perform the 3ds action
-> payments retrieve
```
{
    "payment_id": "pay_rsLVCXS2Q8uTBPdF4P1j",
    "merchant_id": "merchant_1725355756",
    "status": "succeeded",
    "amount": 1000,
    "net_amount": 1000,
    "amount_capturable": 0,
    "amount_received": 1000,
    "connector": "cybersource",
    "client_secret": "pay_rsLVCXS2Q8uTBPdF4P1j_secret_z1CCqBhaQSvZPuiWogkN",
    "created": "2024-09-03T09:37:00.475Z",
    "currency": "USD",
    "customer_id": "cu_1725356220",
    "customer": {
        "id": "cu_1725356220",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "5454",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "545454",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": null,
            "payment_checks": {
                "avs_response": {
                    "code": "Y",
                    "codeRaw": "Y"
                },
                "card_verification": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_WoDIt3orfsK8JrDJVLoA",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": "ss"
        },
        "phone": null,
        "email": null
    },
    "order_details": [
        {
            "brand": null,
            "amount": 0,
            "category": null,
            "quantity": 1,
            "product_id": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "product_img_link": null,
            "requires_shipping": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "credit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "7253562280536560303954",
    "frm_message": null,
    "metadata": {},
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_rsLVCXS2Q8uTBPdF4P1j_1",
    "payment_link": null,
    "profile_id": "pro_jQJ4qqk9cMEsOfzx4jjP",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_1jo1uMz1tfWZk0FydFQQ",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-03T09:52:00.475Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "125.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_method_id": "pm_rr5fO13rR1AEOearzGCl",
    "payment_method_status": "active",
    "updated": "2024-09-03T09:37:10.120Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```

screenshot of `network_transaction_id` stored in db
<img width="653" alt="image" src="https://github.com/user-attachments/assets/38c049c5-e311-4114-a9ed-608ac455d105">

-> Make an MIT by passing `"authentication_type": "three_ds"`
```
curl --location 'http://localhost:8080/payments' \
--header 'Accept: application/json' \
--header 'api-key: dev_Wj8BGLQOST1LIlLtkqvFa5Ny19SM8qDTFWlFeVLAuPwxzdP2aKqzXhixqdHzfvUD' \
--header 'Content-Type: application/json' \
--data '{
    "amount": 10000,
    "currency": "USD",
    "capture_method": "automatic",
    "authentication_type": "three_ds",
    "confirm": false,
    "setup_future_usage": "off_session",
    "customer_id": "cu_1725356220"
}'
```
```
{
    "payment_id": "pay_g0jDr2tevq4O4iuRLrkl",
    "merchant_id": "merchant_1725355756",
    "status": "requires_payment_method",
    "amount": 10000,
    "net_amount": 10000,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": null,
    "client_secret": "pay_g0jDr2tevq4O4iuRLrkl_secret_Hib6ubDZBOEvGCi95wUF",
    "created": "2024-09-03T09:48:41.237Z",
    "currency": "USD",
    "customer_id": "cu_1725356220",
    "customer": {
        "id": "cu_1725356220",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": null,
    "payment_method_data": null,
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": null,
    "authentication_type": "three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": null,
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "cu_1725356220",
        "created_at": 1725356921,
        "expires": 1725360521,
        "secret": "epk_eaf976174caa4444a402c8682ef968be"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_jQJ4qqk9cMEsOfzx4jjP",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": null,
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-03T10:03:41.237Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-03T09:48:41.285Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```

-> List customer payment method
```
curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_g0jDr2tevq4O4iuRLrkl_secret_Hib6ubDZBOEvGCi95wUF' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_7aad1e742bd64afeac0e9335cbb68a52'
```
```
{
    "customer_payment_methods": [
        {
            "payment_token": "token_aGOLcq6wQAslGXTO9qLG",
            "payment_method_id": "pm_rr5fO13rR1AEOearzGCl",
            "customer_id": "cu_1725356220",
            "payment_method": "card",
            "payment_method_type": "credit",
            "payment_method_issuer": null,
            "payment_method_issuer_code": null,
            "recurring_enabled": true,
            "installment_payment_enabled": false,
            "payment_experience": [
                "redirect_to_url"
            ],
            "card": {
                "scheme": null,
                "issuer_country": null,
                "last4_digits": "5454",
                "expiry_month": "03",
                "expiry_year": "2030",
                "card_token": null,
                "card_holder_name": "name name",
                "card_fingerprint": null,
                "nick_name": null,
                "card_network": null,
                "card_isin": "545454",
                "card_issuer": null,
                "card_type": null,
                "saved_to_locker": true
            },
            "metadata": null,
            "created": "2024-09-03T09:37:02.012Z",
            "bank": null,
            "surcharge_details": null,
            "requires_cvv": false,
            "last_used_at": "2024-09-03T09:44:18.004Z",
            "default_payment_method_set": true,
            "billing": {
                "address": {
                    "city": "San Fransico",
                    "country": "US",
                    "line1": "1467",
                    "line2": "Harrison Street",
                    "line3": "Harrison Street",
                    "zip": "94122",
                    "state": "California",
                    "first_name": "name",
                    "last_name": "name"
                },
                "phone": null,
                "email": null
            }
        }
    ],
    "is_guest_customer": false
}
```
-> Confirm the payment with payment id
```
curl --location 'http://localhost:8080/payments/pay_g0jDr2tevq4O4iuRLrkl/confirm' \
--header 'api-key: pk_dev_7aad1e742bd64afeac0e9335cbb68a52' \
--header 'Content-Type: application/json' \
--data '{
    "payment_token": "token_aGOLcq6wQAslGXTO9qLG",
    "client_secret": "pay_g0jDr2tevq4O4iuRLrkl_secret_Hib6ubDZBOEvGCi95wUF",
    "payment_method": "card"
}'
```
```
{
    "payment_id": "pay_g0jDr2tevq4O4iuRLrkl",
    "merchant_id": "merchant_1725355756",
    "status": "succeeded",
    "amount": 10000,
    "net_amount": 10000,
    "amount_capturable": 0,
    "amount_received": 10000,
    "connector": "cybersource",
    "client_secret": "pay_g0jDr2tevq4O4iuRLrkl_secret_Hib6ubDZBOEvGCi95wUF",
    "created": "2024-09-03T09:48:41.237Z",
    "currency": "USD",
    "customer_id": "cu_1725356220",
    "customer": {
        "id": "cu_1725356220",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65"
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "5454",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "545454",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": null,
            "payment_checks": {
                "avs_response": {
                    "code": "Y",
                    "codeRaw": "Y"
                },
                "card_verification": null
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_aGOLcq6wQAslGXTO9qLG",
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": null,
    "authentication_type": "three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": null,
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": false,
    "connector_transaction_id": "7253569912966834103954",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_g0jDr2tevq4O4iuRLrkl_1",
    "payment_link": null,
    "profile_id": "pro_jQJ4qqk9cMEsOfzx4jjP",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_1jo1uMz1tfWZk0FydFQQ",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-03T10:03:41.237Z",
    "fingerprint": null,
    "browser_info": {
        "language": null,
        "time_zone": null,
        "ip_address": "::1",
        "user_agent": null,
        "color_depth": null,
        "java_enabled": null,
        "screen_width": null,
        "accept_header": null,
        "screen_height": null,
        "java_script_enabled": null
    },
    "payment_method_id": "pm_rr5fO13rR1AEOearzGCl",
    "payment_method_status": "active",
    "updated": "2024-09-03T09:49:52.659Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}
```



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