Bug: [BUG] [SHIFT4] 3DS payments not working



### Bug Description

3ds payments not working for shift4

### Expected Behavior

3ds payments should work for shift4

### Actual Behavior

3ds payments not working for connector shift4

### 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/hyperswitch_connectors/src/connectors/shift4.rs b/crates/hyperswitch_connectors/src/connectors/shift4.rs
index 3af15de507f..01b23f61e56 100644
--- a/crates/hyperswitch_connectors/src/connectors/shift4.rs
+++ b/crates/hyperswitch_connectors/src/connectors/shift4.rs
@@ -2,6 +2,7 @@ pub mod transformers;
 use std::sync::LazyLock;
 
 use api_models::webhooks::IncomingWebhookEvent;
+use base64::Engine;
 use common_enums::enums;
 use common_utils::{
     errors::CustomResult,
@@ -46,7 +47,7 @@ use hyperswitch_interfaces::{
     types::{self, Response},
     webhooks::{IncomingWebhook, IncomingWebhookRequestDetails},
 };
-use masking::Mask;
+use masking::{Mask, PeekInterface};
 use transformers::{self as shift4, Shift4PaymentsRequest, Shift4RefundRequest};
 
 use crate::{
@@ -111,9 +112,13 @@ impl ConnectorCommon for Shift4 {
     ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
         let auth = shift4::Shift4AuthType::try_from(auth_type)
             .change_context(errors::ConnectorError::FailedToObtainAuthType)?;
+        let api_key = format!(
+            "Basic {}",
+            common_utils::consts::BASE64_ENGINE.encode(format!("{}:", auth.api_key.peek()))
+        );
         Ok(vec![(
             headers::AUTHORIZATION.to_string(),
-            auth.api_key.into_masked(),
+            api_key.into_masked(),
         )])
     }
 
@@ -277,7 +282,19 @@ impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData
     }
 }
 
-impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Shift4 {}
+impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Shift4 {
+    fn build_request(
+        &self,
+        _req: &hyperswitch_domain_models::types::PaymentsCancelRouterData,
+        _connectors: &Connectors,
+    ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        Err(errors::ConnectorError::NotSupported {
+            message: "Void".to_string(),
+            connector: "Shift4",
+        }
+        .into())
+    }
+}
 
 impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Shift4 {
     fn get_headers(
@@ -373,6 +390,12 @@ impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> fo
         req: &PaymentsCaptureRouterData,
         connectors: &Connectors,
     ) -> CustomResult<Option<Request>, errors::ConnectorError> {
+        if req.request.amount_to_capture != req.request.payment_amount {
+            Err(errors::ConnectorError::NotSupported {
+                message: "Partial Capture".to_string(),
+                connector: "Shift4",
+            })?
+        }
         Ok(Some(
             RequestBuilder::new()
                 .method(Method::Post)
@@ -488,7 +511,7 @@ impl ConnectorIntegration<PreProcessing, PaymentsPreProcessingData, PaymentsResp
         )?;
         let connector_router_data = shift4::Shift4RouterData::try_from((amount, req))?;
         let connector_req = Shift4PaymentsRequest::try_from(&connector_router_data)?;
-        Ok(RequestContent::Json(Box::new(connector_req)))
+        Ok(RequestContent::FormUrlEncoded(Box::new(connector_req)))
     }
 
     fn build_request(

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

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

## Description
<!-- Describe your changes in detail -->

- Fixed 3DS payments for Shift4.
- Updated shift4 authentication to use the direct secret key from shift4 dashboard, removing the need for manual Base64 encoding.
- Updated error messages for unsupported flows like Void and Partial Captures.

### 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).
-->
https://github.com/juspay/hyperswitch/issues/9479

## 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)?
-->
Cypress:
<img width="555" height="883" alt="image" src="https://github.com/user-attachments/assets/7dca5ff2-2ce7-4b7f-84cb-11a50c639508" />
Note: All card test cases are working as expected. Only 1 sofort test case is failing during redirection(which is unrelated to this PR)

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