Bug: [BUG] [CRYPTOPAY] PSYNC Call Failing



### Bug Description

The PSYNC call is failing for connector cryptopay which is resulting in payments getting stuck in the `requires_customer_action` state.

### Expected Behavior

The PSYNC should work for connector cryptopay and payments should go into `succeeded`.

### Actual Behavior

The PSYNC call is failing for connector cryptopay which is resulting in payments getting stuck in the `requires_customer_action` state.
<img width="450" alt="Screenshot 2024-01-19 at 2 55 29 PM" src="https://github.com/juspay/hyperswitch/assets/41580413/ff58a9a5-b062-46f4-be02-1cbcf1d855e0">
<img width="1270" alt="Screenshot 2024-01-19 at 2 55 59 PM" src="https://github.com/juspay/hyperswitch/assets/41580413/46aa4d11-d4f1-453b-bd31-6a61c177c8ba">

### Steps To Reproduce

1. Create a `crypto_currency` payment for connector `cryptopay`.
2. Try to do PSYNC on the payment.

### Context For The Bug

https://juspay.slack.com/archives/C05SDGYKFM1/p1705507357108199

### Environment


### 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/cryptopay.rs b/crates/router/src/connector/cryptopay.rs
index 95ea7ef0c7a..8727461ba34 100644
--- a/crates/router/src/connector/cryptopay.rs
+++ b/crates/router/src/connector/cryptopay.rs
@@ -69,14 +69,24 @@ where
         req: &types::RouterData<Flow, Request, Response>,
         connectors: &settings::Connectors,
     ) -> CustomResult<Vec<(String, request::Maskable<String>)>, errors::ConnectorError> {
-        let api_method = self.get_http_method().to_string();
-        let body = types::RequestBody::get_inner_value(self.get_request_body(req, connectors)?)
-            .peek()
-            .to_owned();
-        let md5_payload = crypto::Md5
-            .generate_digest(body.as_bytes())
-            .change_context(errors::ConnectorError::RequestEncodingFailed)?;
-        let payload = encode(md5_payload);
+        let method = self.get_http_method();
+        let payload = match method {
+            common_utils::request::Method::Get => String::default(),
+            common_utils::request::Method::Post
+            | common_utils::request::Method::Put
+            | common_utils::request::Method::Delete
+            | common_utils::request::Method::Patch => {
+                let body =
+                    types::RequestBody::get_inner_value(self.get_request_body(req, connectors)?)
+                        .peek()
+                        .to_owned();
+                let md5_payload = crypto::Md5
+                    .generate_digest(body.as_bytes())
+                    .change_context(errors::ConnectorError::RequestEncodingFailed)?;
+                encode(md5_payload)
+            }
+        };
+        let api_method = method.to_string();
 
         let now = date_time::date_as_yyyymmddthhmmssmmmz()
             .into_report()

## 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 -->
The encoding for empty string in header generation for PSYNC call is removed. This encoding was previously causing the PSYNC call to fail.

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

## 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 crypto_currency payment for connector cryptopay.
`curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: API_KEY_HERE' \
--data-raw '{
    "amount": 10,
    "currency": "INR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "custo",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "crypto",
    "payment_method_type": "crypto_currency",
    "payment_experience": "redirect_to_url",
    "payment_method_data": {
        "crypto": {
            "pay_currency": "XRP"
        }
    },
    "billing": {
        "address": {
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "order_details": [
        {
            "product_name": "test",
            "quantity": 1,
            "amount": 10
        }
    ],
    "business_label": "food",
    "business_country": "US"
}'`
- Try to do PSYNC on the payment and status of the payment should be `succeeded`
`curl --location 'http://localhost:8080/payments/{payment_id}' \
--header 'Accept: application/json' \
--header 'api-key: API_KEY_HERE'`

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