From ac5349cd7160f67f7a56f48f54981cf3dc1e5b52 Mon Sep 17 00:00:00 2001 From: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:11:37 +0530 Subject: [PATCH] refactor(api_lock): allow api lock on psync only when force sync is true (#3242) --- crates/router/src/routes/payments.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/router/src/routes/payments.rs b/crates/router/src/routes/payments.rs index 2ae1d620cc..34f41c49cd 100644 --- a/crates/router/src/routes/payments.rs +++ b/crates/router/src/routes/payments.rs @@ -1271,7 +1271,7 @@ impl GetLockingInput for payment_types::PaymentsRetrieveRequest { lock_utils::ApiIdentifier: From, { match self.resource_id { - payment_types::PaymentIdType::PaymentIntentId(ref id) => { + payment_types::PaymentIdType::PaymentIntentId(ref id) if self.force_sync => { api_locking::LockAction::Hold { input: api_locking::LockingInput { unique_locking_key: id.to_owned(),