fix(router): Handle encoded_data in PSync [V2] (#8177)

This commit is contained in:
Anurag Thakur
2025-06-02 15:23:59 +05:30
committed by GitHub
parent 55f6dbe319
commit a19e12c095

View File

@ -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();