Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(router): Remove the locker call in the psync flow (#5348)

Shankar Singh C24360b22efc3
diff --git a/crates/router/src/core/payments/operations.rs b/crates/router/src/core/payments/operations.rs
index f5bc401465..be54ead0ac 100644
--- a/crates/router/src/core/payments/operations.rs
+++ b/crates/router/src/core/payments/operations.rs
@@ -299,27 +299,18 @@ where
#[instrument(skip_all)]
async fn make_pm_data<'a>(
&'a self,
- state: &'a SessionState,
- payment_data: &mut PaymentData<F>,
- storage_scheme: enums::MerchantStorageScheme,
- merchant_key_store: &domain::MerchantKeyStore,
- customer: &Option<domain::Customer>,
- business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
+ _state: &'a SessionState,
+ _payment_data: &mut PaymentData<F>,
+ _storage_scheme: enums::MerchantStorageScheme,
+ _merchant_key_store: &domain::MerchantKeyStore,
+ _customer: &Option<domain::Customer>,
+ _business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
) -> RouterResult<(
BoxedOperation<'a, F, api::PaymentsRetrieveRequest>,
Option<api::PaymentMethodData>,
Option<String>,
)> {
- helpers::make_pm_data(
- Box::new(self),
- state,
- payment_data,
- merchant_key_store,
- customer,
- storage_scheme,
- business_profile,
- )
- .await
+ Ok((Box::new(self), None, None))
}
#[instrument(skip_all)]
diff --git a/crates/router/src/core/payments/operations/payment_status.rs b/crates/router/src/core/payments/operations/payment_status.rs
index 5d4a5037b7..5f20ccdf27 100644
--- a/crates/router/src/core/payments/operations/payment_status.rs
+++ b/crates/router/src/core/payments/operations/payment_status.rs
@@ -85,27 +85,18 @@ impl<F: Clone + Send> Domain<F, api::PaymentsRequest> for PaymentStatus {
#[instrument(skip_all)]
async fn make_pm_data<'a>(
&'a self,
- state: &'a SessionState,
- payment_data: &mut PaymentData<F>,
- storage_scheme: enums::MerchantStorageScheme,
- merchant_key_store: &domain::MerchantKeyStore,
- customer: &Option<domain::Customer>,
- business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
+ _state: &'a SessionState,
+ _payment_data: &mut PaymentData<F>,
+ _storage_scheme: enums::MerchantStorageScheme,
+ _merchant_key_store: &domain::MerchantKeyStore,
+ _customer: &Option<domain::Customer>,
+ _business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
) -> RouterResult<(
BoxedOperation<'a, F, api::PaymentsRequest>,
Option<api::PaymentMethodData>,
Option<String>,
)> {
- helpers::make_pm_data(
- Box::new(self),
- state,
- payment_data,
- merchant_key_store,
- customer,
- storage_scheme,
- business_profile,
- )
- .await
+ Ok((Box::new(self), None, None))
}
#[instrument(skip_all)]