Bug: [FEATURE] : [Bambora] mask pii information in connector request and response 



### Feature Description

Mask pii information passed and received in the connector request and response

### Possible Implementation

Refactor all sensitive response and request fields secret

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

Yes, I am willing to submit a PR!
diff --git a/crates/router/src/connector/bambora.rs b/crates/router/src/connector/bambora.rs
index e2d9e18ce96..d453677deb6 100644
--- a/crates/router/src/connector/bambora.rs
+++ b/crates/router/src/connector/bambora.rs
@@ -228,8 +228,10 @@ impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsR
             .response
             .parse_struct("bambora PaymentsResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
+
         types::RouterData::try_from((
             types::ResponseRouterData {
                 response,
@@ -324,8 +326,10 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
             .response
             .parse_struct("bambora PaymentsResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
+
         types::RouterData::try_from((
             types::ResponseRouterData {
                 response,
@@ -405,8 +409,10 @@ impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::Payme
             .response
             .parse_struct("Bambora PaymentsResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
+
         types::RouterData::try_from((
             types::ResponseRouterData {
                 response,
@@ -597,8 +603,10 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
             .response
             .parse_struct("bambora RefundResponse")
             .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
+
         types::RefundsRouterData::try_from(types::ResponseRouterData {
             response,
             data: data.clone(),
@@ -669,8 +677,10 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
             .response
             .parse_struct("bambora RefundResponse")
             .change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
+
         event_builder.map(|i| i.set_response_body(&response));
         router_env::logger::info!(connector_response=?response);
+
         types::RouterData::try_from(types::ResponseRouterData {
             response,
             data: data.clone(),
diff --git a/crates/router/src/connector/bambora/transformers.rs b/crates/router/src/connector/bambora/transformers.rs
index d2c99bbaca0..c47b0718287 100644
--- a/crates/router/src/connector/bambora/transformers.rs
+++ b/crates/router/src/connector/bambora/transformers.rs
@@ -1,7 +1,7 @@
 use base64::Engine;
-use common_utils::ext_traits::ValueExt;
+use common_utils::{ext_traits::ValueExt, pii::IpAddress};
 use error_stack::{IntoReport, ResultExt};
-use masking::{PeekInterface, Secret};
+use masking::{ExposeInterface, PeekInterface, Secret};
 use serde::{Deserialize, Deserializer, Serialize};
 
 use crate::{
@@ -51,7 +51,7 @@ pub struct BamboraPaymentsRequest {
     order_number: String,
     amount: i64,
     payment_method: PaymentMethod,
-    customer_ip: Option<std::net::IpAddr>,
+    customer_ip: Option<Secret<String, IpAddress>>,
     term_url: Option<String>,
     card: BamboraCard,
 }
@@ -133,7 +133,9 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for BamboraPaymentsRequest {
                     amount: item.request.amount,
                     payment_method: PaymentMethod::Card,
                     card: bambora_card,
-                    customer_ip: browser_info.ip_address,
+                    customer_ip: browser_info
+                        .ip_address
+                        .map(|ip_address| Secret::new(format!("{ip_address}"))),
                     term_url: item.request.complete_authorize_url.clone(),
                 })
             }
@@ -235,7 +237,7 @@ impl<F, T>
                         mandate_reference: None,
                         connector_metadata: Some(
                             serde_json::to_value(BamboraMeta {
-                                three_d_session_data: response.three_d_session_data,
+                                three_d_session_data: response.three_d_session_data.expose(),
                             })
                             .into_report()
                             .change_context(errors::ConnectorError::ResponseHandlingFailed)?,
@@ -312,7 +314,7 @@ pub struct BamboraPaymentsResponse {
 #[derive(Debug, Clone, Deserialize, Serialize)]
 pub struct Bambora3DsResponse {
     #[serde(rename = "3d_session_data")]
-    three_d_session_data: String,
+    three_d_session_data: Secret<String>,
     contents: String,
 }
 
@@ -334,12 +336,12 @@ pub struct CardResponse {
 
 #[derive(Default, Debug, Clone, Deserialize, PartialEq, Serialize)]
 pub struct CardData {
-    name: Option<String>,
-    expiry_month: Option<String>,
-    expiry_year: Option<String>,
+    name: Option<Secret<String>>,
+    expiry_month: Option<Secret<String>>,
+    expiry_year: Option<Secret<String>>,
     card_type: String,
-    last_four: String,
-    card_bin: Option<String>,
+    last_four: Secret<String>,
+    card_bin: Option<Secret<String>>,
     avs_result: String,
     cvd_result: String,
     cavv_result: Option<String>,
@@ -357,15 +359,15 @@ pub struct AvsObject {
 
 #[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]
 pub struct AddressData {
-    name: String,
-    address_line1: String,
-    address_line2: String,
+    name: Secret<String>,
+    address_line1: Secret<String>,
+    address_line2: Secret<String>,
     city: String,
     province: String,
     country: String,
-    postal_code: String,
-    phone_number: String,
-    email_address: String,
+    postal_code: Secret<String>,
+    phone_number: Secret<String>,
+    email_address: Secret<String>,
 }
 
 #[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)]

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

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

## Description
<!-- Describe your changes in detail -->
Mask pii information passed and received in the connector request and response for Bambora


## Test Case
Check if sensitive fields within connector request and response is masked in the click house for bambora

Sanity test
1. Payment create -
Card 
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: {{api_key}}' \
--data-raw '{
  "amount": 2000,
  "currency": "GBP",
  "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": "no_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": "US",
      "first_name": "John",
      "last_name": "Doe"
    }
  },
  "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": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "US",
      "first_name": "John",
      "last_name": "Doe"
    }
  },
  "statement_descriptor_name": "joseph",
  "statement_descriptor_suffix": "JS",
  "metadata": {
    "udf1": "value1",
    "new_customer": "true",
    "login_date": "2019-09-10T10:11:12Z"
  },
  "payment_method": "card",
  "payment_method_data": {
    "card": {
      "card_number": "5123456789012346",
      "card_exp_month": "10",
      "card_exp_year": "30",
      "card_holder_name": "Joseph Doe",
      "card_cvc": "123"
    }
  }
}'
```
Card 3ds
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: {{api_key}}' \
--data-raw '{
  "amount": 2000,
  "currency": "GBP",
  "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": "US",
      "first_name": "John",
      "last_name": "Doe"
    }
  },
  "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": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "US",
      "first_name": "John",
      "last_name": "Doe"
    }
  },
  "statement_descriptor_name": "joseph",
  "statement_descriptor_suffix": "JS",
  "metadata": {
    "udf1": "value1",
    "new_customer": "true",
    "login_date": "2019-09-10T10:11:12Z"
  },
  "payment_method": "card",
  "payment_method_data": {
    "card": {
      "card_number": "5123456789012346",
      "card_exp_month": "10",
      "card_exp_year": "30",
      "card_holder_name": "Joseph Doe",
      "card_cvc": "123"
    }
  }
}'
```
In logs check for
`topic = "hyperswitch-outgoing-connector-events" `

2. Refund

> _Note: There is an existing issue with this connector #3701. That could affect testing_

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