Bug: replace underscore by hyphen in Samsung pay session call



replace underscore by hyphen in Samsung pay session call as it is passed to samsung pay as `order_number`. And Samsung pay does not accept underscore
diff --git a/crates/router/src/core/payments/flows/session_flow.rs b/crates/router/src/core/payments/flows/session_flow.rs
index 1785eee87c5..053c9b8fb0a 100644
--- a/crates/router/src/core/payments/flows/session_flow.rs
+++ b/crates/router/src/core/payments/flows/session_flow.rs
@@ -567,13 +567,15 @@ fn create_samsung_pay_session_token(
         })?,
     };
 
+    let formatted_payment_id = router_data.payment_id.replace("_", "-");
+
     Ok(types::PaymentsSessionRouterData {
         response: Ok(types::PaymentsResponseData::SessionResponse {
             session_token: payment_types::SessionToken::SamsungPay(Box::new(
                 payment_types::SamsungPaySessionTokenResponse {
                     version: "2".to_string(),
                     service_id: samsung_pay_wallet_details.service_id,
-                    order_number: router_data.payment_id.clone(),
+                    order_number: formatted_payment_id,
                     merchant_payment_information:
                         payment_types::SamsungPayMerchantPaymentInformation {
                             name: samsung_pay_wallet_details.merchant_display_name,

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


### 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 a connector with samsung pay enabled
-> Create a payment
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:' \
--data '{
  "amount": 100000,
  "currency": "USD",
  "capture_method": "automatic",
  "authentication_type": "no_three_ds",
  "confirm": false,
  "customer_id": "cu_1728548597"
}'
```
```
{
    "payment_id": "pay_mJFt25nBNl0ZKeW122Eu",
    "merchant_id": "merchant_1728917453",
    "status": "requires_payment_method",
    "amount": 100000,
    "net_amount": 100000,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": null,
    "client_secret": "pay_mJFt25nBNl0ZKeW122Eu_secret_ssXacvSHe4w7Q6smAWOQ",
    "created": "2024-10-14T14:51:05.156Z",
    "currency": "USD",
    "customer_id": "cu_1728548597",
    "customer": {
        "id": "cu_1728548597",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "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": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_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_1728548597",
        "created_at": 1728917465,
        "expires": 1728921065,
        "secret": "epk_cd0634f3e55a456aab914f0715a37cbd"
    },
    "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_a54a9pfTV5Yf5U2wboZ2",
    "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-10-14T15:06:05.156Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-10-14T14:51:05.213Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null
}
```

-> session call
```
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'x-browser-name: Chrome' \
--header 'x-client-platform: web' \
--header 'x-merchant-domain: sdk-test-app.netlify.app' \
--header 'api-key: pk_dev_f89f808cd23b4b53ba1f84d1ae675e3c' \
--data '{
    "payment_id": "pay_mJFt25nBNl0ZKeW122Eu",
    "wallets": [],
    "client_secret": "pay_mJFt25nBNl0ZKeW122Eu_secret_ssXacvSHe4w7Q6smAWOQ"
}'
```
```
{
    "payment_id": "pay_mJFt25nBNl0ZKeW122Eu",
    "client_secret": "pay_mJFt25nBNl0ZKeW122Eu_secret_ssXacvSHe4w7Q6smAWOQ",
    "session_token": [
        {
            "wallet_name": "google_pay",
            "merchant_info": {
                "merchant_name": "Stripe"
            },
            "shipping_address_required": false,
            "email_required": false,
            "shipping_address_parameters": {
                "phone_number_required": false
            },
            "allowed_payment_methods": [
                {
                    "type": "CARD",
                    "parameters": {
                        "allowed_auth_methods": [
                            "PAN_ONLY",
                            "CRYPTOGRAM_3DS"
                        ],
                        "allowed_card_networks": [
                            "AMEX",
                            "DISCOVER",
                            "INTERAC",
                            "JCB",
                            "MASTERCARD",
                            "VISA"
                        ],
                        "billing_address_required": false
                    },
                    "tokenization_specification": {
                        "type": "PAYMENT_GATEWAY",
                        "parameters": {
                            "gateway": "stripe",
                            "stripe:version": "2018-10-31",
                            "stripe:publishableKey": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
                        }
                    }
                }
            ],
            "transaction_info": {
                "country_code": "US",
                "currency_code": "USD",
                "total_price_status": "Final",
                "total_price": "1000.00"
            },
            "delayed_session_token": false,
            "connector": "cybersource",
            "sdk_next_action": {
                "next_action": "confirm"
            },
            "secrets": null
        },
        {
            "wallet_name": "samsung_pay",
            "version": "2",
            "service_id": "49400558c67f4a97b3925f",
            "order_number": "pay-mJFt25nBNl0ZKeW122Eu",
            "merchant": {
                "name": "Hyperswitch",
                "url": "sdk-test-app.netlify.app",
                "country_code": "IN"
            },
            "amount": {
                "option": "FORMAT_TOTAL_PRICE_ONLY",
                "currency_code": "USD",
                "total": "1000.00"
            },
            "protocol": "PROTOCOL3DS",
            "allowed_brands": [
                "visa",
                "masterCard",
                "amex",
                "discover"
            ]
        },
        {
            "wallet_name": "apple_pay",
            "payment_request_data": {
                "country_code": "US",
                "currency_code": "USD",
                "total": {
                    "label": "applepay",
                    "type": "final",
                    "amount": "1000.00"
                },
                "merchant_capabilities": [
                    "supports3DS"
                ],
                "supported_networks": [
                    "visa",
                    "masterCard",
                    "amex",
                    "discover"
                ],
                "merchant_identifier": "merchant.com.hyperswitch.checkout"
            },
            "connector": "cybersource",
            "delayed_session_token": false,
            "sdk_next_action": {
                "next_action": "confirm"
            },
            "connector_reference_id": null,
            "connector_sdk_public_key": null,
            "connector_merchant_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
