Bug: [BUG] : [Stripe] make name mandatory 



### Bug Description

Field called name in stripe Shipping address is not an optional at the stripe's end but it is optional in hyperswitch's stripe transformer

### Expected Behavior

Stripe transformer must treat name as a mandatory field

### Actual Behavior

Stripe transformer treats name as an optional field

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

_No response_

### Environment

Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the `x-request-id` response header to help 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 checking if this bug 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?

Yes, I am willing to submit a PR!
diff --git a/crates/router/src/connector/stripe/transformers.rs b/crates/router/src/connector/stripe/transformers.rs
index 45e2c795a0d..82dee21f7e6 100644
--- a/crates/router/src/connector/stripe/transformers.rs
+++ b/crates/router/src/connector/stripe/transformers.rs
@@ -117,7 +117,7 @@ pub struct PaymentIntentRequest {
     pub setup_mandate_details: Option<StripeMandateRequest>,
     pub description: Option<String>,
     #[serde(flatten)]
-    pub shipping: StripeShippingAddress,
+    pub shipping: Option<StripeShippingAddress>,
     #[serde(flatten)]
     pub billing: StripeBillingAddress,
     #[serde(flatten)]
@@ -882,26 +882,33 @@ impl TryFrom<&api_models::enums::BankNames> for StripeBankNames {
 }
 
 fn validate_shipping_address_against_payment_method(
-    shipping_address: &StripeShippingAddress,
+    shipping_address: &Option<StripeShippingAddress>,
     payment_method: Option<&StripePaymentMethodType>,
 ) -> Result<(), error_stack::Report<errors::ConnectorError>> {
-    if let Some(StripePaymentMethodType::AfterpayClearpay) = payment_method {
-        let missing_fields = collect_missing_value_keys!(
-            ("shipping.address.first_name", shipping_address.name),
-            ("shipping.address.line1", shipping_address.line1),
-            ("shipping.address.country", shipping_address.country),
-            ("shipping.address.zip", shipping_address.zip)
-        );
-
-        if !missing_fields.is_empty() {
-            return Err(errors::ConnectorError::MissingRequiredFields {
-                field_names: missing_fields,
+    match payment_method {
+        Some(StripePaymentMethodType::AfterpayClearpay) => match shipping_address {
+            Some(address) => {
+                let missing_fields = collect_missing_value_keys!(
+                    ("shipping.address.line1", address.line1),
+                    ("shipping.address.country", address.country),
+                    ("shipping.address.zip", address.zip)
+                );
+
+                if !missing_fields.is_empty() {
+                    return Err(errors::ConnectorError::MissingRequiredFields {
+                        field_names: missing_fields,
+                    })
+                    .into_report();
+                }
+                Ok(())
+            }
+            None => Err(errors::ConnectorError::MissingRequiredField {
+                field_name: "shipping.address",
             })
-            .into_report();
-        }
+            .into_report(),
+        },
+        _ => Ok(()),
     }
-
-    Ok(())
 }
 
 impl TryFrom<&api_models::payments::PayLaterData> for StripePaymentMethodType {
@@ -1717,23 +1724,27 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PaymentIntentRequest {
         let shipping_address = match item.get_optional_shipping() {
             Some(shipping_details) => {
                 let shipping_address = shipping_details.address.as_ref();
-                StripeShippingAddress {
+                Some(StripeShippingAddress {
                     city: shipping_address.and_then(|a| a.city.clone()),
                     country: shipping_address.and_then(|a| a.country),
                     line1: shipping_address.and_then(|a| a.line1.clone()),
                     line2: shipping_address.and_then(|a| a.line2.clone()),
                     zip: shipping_address.and_then(|a| a.zip.clone()),
                     state: shipping_address.and_then(|a| a.state.clone()),
-                    name: shipping_address.and_then(|a| {
-                        a.first_name.as_ref().map(|first_name| {
-                            format!(
-                                "{} {}",
-                                first_name.clone().expose(),
-                                a.last_name.clone().expose_option().unwrap_or_default()
-                            )
-                            .into()
+                    name: shipping_address
+                        .and_then(|a| {
+                            a.first_name.as_ref().map(|first_name| {
+                                format!(
+                                    "{} {}",
+                                    first_name.clone().expose(),
+                                    a.last_name.clone().expose_option().unwrap_or_default()
+                                )
+                                .into()
+                            })
                         })
-                    }),
+                        .ok_or(errors::ConnectorError::MissingRequiredField {
+                            field_name: "shipping_address.first_name",
+                        })?,
                     phone: shipping_details.phone.as_ref().map(|p| {
                         format!(
                             "{}{}",
@@ -1742,9 +1753,9 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PaymentIntentRequest {
                         )
                         .into()
                     }),
-                }
+                })
             }
-            None => StripeShippingAddress::default(),
+            None => None,
         };
 
         let billing_address = match item.get_optional_billing() {
@@ -2930,7 +2941,7 @@ pub struct StripeShippingAddress {
     #[serde(rename = "shipping[address][state]")]
     pub state: Option<Secret<String>>,
     #[serde(rename = "shipping[name]")]
-    pub name: Option<Secret<String>>,
+    pub name: Secret<String>,
     #[serde(rename = "shipping[phone]")]
     pub phone: Option<Secret<String>>,
 }
@@ -3841,7 +3852,7 @@ mod test_validate_shipping_address_against_payment_method {
     fn should_return_ok() {
         // Arrange
         let stripe_shipping_address = create_stripe_shipping_address(
-            Some("name".to_string()),
+            "name".to_string(),
             Some("line1".to_string()),
             Some(CountryAlpha2::AD),
             Some("zip".to_string()),
@@ -3851,7 +3862,7 @@ mod test_validate_shipping_address_against_payment_method {
 
         //Act
         let result = validate_shipping_address_against_payment_method(
-            &stripe_shipping_address,
+            &Some(stripe_shipping_address),
             Some(payment_method),
         );
 
@@ -3859,39 +3870,11 @@ mod test_validate_shipping_address_against_payment_method {
         assert!(result.is_ok());
     }
 
-    #[test]
-    fn should_return_err_for_empty_name() {
-        // Arrange
-        let stripe_shipping_address = create_stripe_shipping_address(
-            None,
-            Some("line1".to_string()),
-            Some(CountryAlpha2::AD),
-            Some("zip".to_string()),
-        );
-
-        let payment_method = &StripePaymentMethodType::AfterpayClearpay;
-
-        //Act
-        let result = validate_shipping_address_against_payment_method(
-            &stripe_shipping_address,
-            Some(payment_method),
-        );
-
-        // Assert
-        assert!(result.is_err());
-        let missing_fields = get_missing_fields(result.unwrap_err().current_context()).to_owned();
-        assert_eq!(missing_fields.len(), 1);
-        assert_eq!(
-            *missing_fields.first().unwrap(),
-            "shipping.address.first_name"
-        );
-    }
-
     #[test]
     fn should_return_err_for_empty_line1() {
         // Arrange
         let stripe_shipping_address = create_stripe_shipping_address(
-            Some("name".to_string()),
+            "name".to_string(),
             None,
             Some(CountryAlpha2::AD),
             Some("zip".to_string()),
@@ -3901,7 +3884,7 @@ mod test_validate_shipping_address_against_payment_method {
 
         //Act
         let result = validate_shipping_address_against_payment_method(
-            &stripe_shipping_address,
+            &Some(stripe_shipping_address),
             Some(payment_method),
         );
 
@@ -3916,7 +3899,7 @@ mod test_validate_shipping_address_against_payment_method {
     fn should_return_err_for_empty_country() {
         // Arrange
         let stripe_shipping_address = create_stripe_shipping_address(
-            Some("name".to_string()),
+            "name".to_string(),
             Some("line1".to_string()),
             None,
             Some("zip".to_string()),
@@ -3926,7 +3909,7 @@ mod test_validate_shipping_address_against_payment_method {
 
         //Act
         let result = validate_shipping_address_against_payment_method(
-            &stripe_shipping_address,
+            &Some(stripe_shipping_address),
             Some(payment_method),
         );
 
@@ -3941,7 +3924,7 @@ mod test_validate_shipping_address_against_payment_method {
     fn should_return_err_for_empty_zip() {
         // Arrange
         let stripe_shipping_address = create_stripe_shipping_address(
-            Some("name".to_string()),
+            "name".to_string(),
             Some("line1".to_string()),
             Some(CountryAlpha2::AD),
             None,
@@ -3950,7 +3933,7 @@ mod test_validate_shipping_address_against_payment_method {
 
         //Act
         let result = validate_shipping_address_against_payment_method(
-            &stripe_shipping_address,
+            &Some(stripe_shipping_address),
             Some(payment_method),
         );
 
@@ -3967,7 +3950,7 @@ mod test_validate_shipping_address_against_payment_method {
         let expected_missing_field_names: Vec<&'static str> =
             vec!["shipping.address.zip", "shipping.address.country"];
         let stripe_shipping_address = create_stripe_shipping_address(
-            Some("name".to_string()),
+            "name".to_string(),
             Some("line1".to_string()),
             None,
             None,
@@ -3976,7 +3959,7 @@ mod test_validate_shipping_address_against_payment_method {
 
         //Act
         let result = validate_shipping_address_against_payment_method(
-            &stripe_shipping_address,
+            &Some(stripe_shipping_address),
             Some(payment_method),
         );
 
@@ -3997,13 +3980,13 @@ mod test_validate_shipping_address_against_payment_method {
     }
 
     fn create_stripe_shipping_address(
-        name: Option<String>,
+        name: String,
         line1: Option<String>,
         country: Option<CountryAlpha2>,
         zip: Option<String>,
     ) -> StripeShippingAddress {
         StripeShippingAddress {
-            name: name.map(Secret::new),
+            name: Secret::new(name),
             line1: line1.map(Secret::new),
             country,
             zip: zip.map(Secret::new),

## 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 -->
Field called `name` in stripe Shipping address is not optional at the stripe's end. This PR makes it a mandatory field.


## Test Case 
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:{{}}' \
--data-raw '{
  "amount": 7000,
  "currency": "USD",
  "confirm": true,
  "capture_method": "automatic",
  "capture_on": "2022-09-10T10:11:12Z",
  "customer_id": "StripeCustomer",
  "email": "abcdef123@gmail.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",
  "billing": {
    "address": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "SE"
    }
  },
  "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": "127.0.0.1"
  },
  "shipping": {
    "address": {

      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122"

    }
  },
  "statement_descriptor_name": "joseph",
  "statement_descriptor_suffix": "JS",
  "metadata": {
    "order_details": {
      "product_name": "Socks",
      "amount": 7000,
      "quantity": 1
    }
  },
  "payment_method": "pay_later",
  "payment_method_type": "afterpay_clearpay",
  "payment_experience": "redirect_to_url",
  "payment_method_data": {
    "pay_later": {
      "afterpay_clearpay_redirect": {
        "billing_name": "Akshaya",
        "billing_email": "example@example.com"
      }
    }
  }
}'
```

Response
```
{
    "error": {
        "type": "invalid_request",
        "message": "Missing required param: shipping_address.first_name",
        "code": "IR_04"
    }
}
```

## 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
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
