Bug: [FEATURE] allow a dummy connector to succeed for a failure card to show smart routing



### Feature Description


Objective is to show user how smart retry works

### Possible Implementation

stripe_test if the card number is 4000000000009995 previously it was failure with insufficient funds. But now we need to allow it to become success.

### Have you spent some time checking if this feature request has been raised before?

- [x] I checked and didn't find a 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?

None
diff --git a/crates/router/src/routes/dummy_connector/utils.rs b/crates/router/src/routes/dummy_connector/utils.rs
index 367c3bc63d4..0bec0398193 100644
--- a/crates/router/src/routes/dummy_connector/utils.rs
+++ b/crates/router/src/routes/dummy_connector/utils.rs
@@ -11,7 +11,10 @@ use super::{
     consts, errors,
     types::{self, GetPaymentMethodDetails},
 };
-use crate::{configs::settings, routes::SessionState};
+use crate::{
+    configs::settings,
+    routes::{dummy_connector::types::DummyConnectors, SessionState},
+};
 
 pub async fn tokio_mock_sleep(delay: u64, tolerance: u64) {
     let mut rng = rand::thread_rng();
@@ -219,7 +222,7 @@ impl ProcessPaymentAttempt for types::DummyConnectorCard {
         payment_attempt: types::DummyConnectorPaymentAttempt,
         redirect_url: String,
     ) -> types::DummyConnectorResult<types::DummyConnectorPaymentData> {
-        match self.get_flow_from_card_number()? {
+        match self.get_flow_from_card_number(payment_attempt.payment_request.connector.clone())? {
             types::DummyConnectorCardFlow::NoThreeDS(status, error) => {
                 if let Some(error) = error {
                     Err(error)?;
@@ -291,6 +294,7 @@ impl types::DummyConnectorUpiCollect {
 impl types::DummyConnectorCard {
     pub fn get_flow_from_card_number(
         self,
+        connector: DummyConnectors,
     ) -> types::DummyConnectorResult<types::DummyConnectorCardFlow> {
         let card_number = self.number.peek();
         match card_number.as_str() {
@@ -309,12 +313,21 @@ impl types::DummyConnectorCard {
                     }),
                 ))
             }
-            "4000000000009995" => Ok(types::DummyConnectorCardFlow::NoThreeDS(
-                types::DummyConnectorStatus::Failed,
-                Some(errors::DummyConnectorErrors::PaymentDeclined {
-                    message: "Insufficient funds",
-                }),
-            )),
+            "4000000000009995" => {
+                if connector == DummyConnectors::StripeTest {
+                    Ok(types::DummyConnectorCardFlow::NoThreeDS(
+                        types::DummyConnectorStatus::Succeeded,
+                        None,
+                    ))
+                } else {
+                    Ok(types::DummyConnectorCardFlow::NoThreeDS(
+                        types::DummyConnectorStatus::Failed,
+                        Some(errors::DummyConnectorErrors::PaymentDeclined {
+                            message: "Internal Server Error from Connector, Please try again later",
+                        }),
+                    ))
+                }
+            }
             "4000000000009987" => Ok(types::DummyConnectorCardFlow::NoThreeDS(
                 types::DummyConnectorStatus::Failed,
                 Some(errors::DummyConnectorErrors::PaymentDeclined {

…rd payment

## 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 -->
For one connector alone to hard code success with a particular failure card

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

 `stripe_test`  if the card number is `4000000000009995` previously it was failure with insufficient funds. But now we need to allow it to become success.

## Motivation and Context

Objective is to show user how smart retry works so a relevant error message will help


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

## failure for other gateways

<details>
   <summary>Request </summary>

```json
{
    "amount": 333,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_type": "credit",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "connector":["paypal_test"],
    "billing": {
        "address": {
            "zip": "560095",
            "country": "IN",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "payment_method_data": {
        "card": {
            "card_number": "4000000000009995",
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "card_cvc": "100"
        }
  
    }
}

```
</details>

<details>
  <summary>Response</summary>

```json
{
    "payment_id": "pay_04Vahgm5zSgQLH5y5o0S",
    "merchant_id": "merchant_1750933328",
    "status": "failed",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "paypal_test",
    "client_secret": "pay_04Vahgm5zSgQLH5y5o0S_secret_iKiVIRw76fiMFvPXCzU7",
    "created": "2025-06-26T10:32:26.951Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "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": "card",
    "payment_method_data": {
        "card": {
            "last4": "9995",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "400000",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "IN",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak"
        },
        "phone": null,
        "email": 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": "DC_08",
    "error_message": "Payment declined: Internal Server Error",
    "unified_code": "UE_9000",
    "unified_message": "Something went wrong",
    "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": true,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_tvhMochAzQxRKYmWKPgs",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_XioVM508jgIaVMwxgAsw",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-06-26T10:47:26.951Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2025-06-26T10:32:28.008Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null
}
```
</details>

## success for `stripe_test`

<details>
  <summary>Request</summary>

```json
{
    "amount": 333,
    "currency": "EUR",
    "confirm": true,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_type": "credit",
    "authentication_type": "no_three_ds",
    "description": "hellow world",
    "connector":["stripe_test"],
    "billing": {
        "address": {
            "zip": "560095",
            "country": "IN",
            "first_name": "Sakil",
            "last_name": "Mostak",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "city": "Fasdf"
        }
    },
    "payment_method_data": {
        "card": {
            "card_number": "4000000000009995",
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "card_cvc": "100"
        }
  
    }
}

```
</details>


<details>
<summary>Response</summary>

```json
{
    "payment_id": "pay_OqK97rLSs9s7NnwRvLV0",
    "merchant_id": "merchant_1750933328",
    "status": "succeeded",
    "amount": 333,
    "net_amount": 333,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 333,
    "connector": "stripe_test",
    "client_secret": "pay_OqK97rLSs9s7NnwRvLV0_secret_ZfXwEiZvzXjz0jiQFt7y",
    "created": "2025-06-26T10:39:21.936Z",
    "currency": "EUR",
    "customer_id": null,
    "customer": null,
    "description": "hellow world",
    "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": "card",
    "payment_method_data": {
        "card": {
            "last4": "9995",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "400000",
            "card_extended_bin": null,
            "card_exp_month": "01",
            "card_exp_year": "2026",
            "card_holder_name": "John Smith",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": "Fasdf",
            "country": "IN",
            "line1": "Fasdf",
            "line2": "Fasdf",
            "line3": null,
            "zip": "560095",
            "state": null,
            "first_name": "Sakil",
            "last_name": "Mostak"
        },
        "phone": null,
        "email": 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": "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": "pay_LDgbgr5HUer6sqe8YSsq",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_tvhMochAzQxRKYmWKPgs",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_KNpkA14s7QSE6SE8SuUA",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2025-06-26T10:54:21.936Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2025-06-26T10:39:22.945Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null
}

```
</details>

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