Issue:
Bug: Properly Handle encoded_data in PSync flow [v2]



PSync is failing for adyen with error: `validate_psync_reference_id failed`. We need to pass the `encoded_data` in payment_attempt

Pull request description:
## 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 -->
Add `encoded_data` from `PaymentsRetrieveRequest` in `payment_attempt` inside `get_trackers` for PSync

### 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).
-->
Closes #8176 

## 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)?
-->
No visible changes in API response. Verified that payment status changes to `succeeded`.

## 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


Testing:

No visible changes in API response. Verified that payment status changes to `succeeded`.

Patch:
diff --git a/crates/router/src/core/payments/operations/payment_get.rs b/crates/router/src/core/payments/operations/payment_get.rs
index ebf8205ea9b..716030c8f43 100644
--- a/crates/router/src/core/payments/operations/payment_get.rs
+++ b/crates/router/src/core/payments/operations/payment_get.rs
@@ -177,7 +177,7 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentStatusData<F>, PaymentsRetriev
             }
         })?;
 
-        let payment_attempt = db
+        let mut payment_attempt = db
             .find_payment_attempt_by_id(
                 key_manager_state,
                 merchant_context.get_merchant_key_store(),
@@ -188,6 +188,11 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentStatusData<F>, PaymentsRetriev
             .change_context(errors::ApiErrorResponse::InternalServerError)
             .attach_printable("Could not find payment attempt given the attempt id")?;
 
+        payment_attempt.encoded_data = request
+            .param
+            .as_ref()
+            .map(|val| masking::Secret::new(val.clone()));
+
         let should_sync_with_connector =
             request.force_sync && payment_intent.status.should_force_sync_with_connector();