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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix: remove multiple call to locker (#1230)
Sangamesh Kulkarnib3c6b1f0aacb
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rsindex 7605978e5d..f5f9b79b03 100644--- a/crates/router/src/core/payments/helpers.rs+++ b/crates/router/src/core/payments/helpers.rs@@ -782,40 +782,16 @@ pub async fn make_pm_data<'a, F: Clone, R>(}}- Some(api::PaymentMethodData::Wallet(wallet_data)) => {+ Some(api::PaymentMethodData::Wallet(_)) => {payment_data.payment_attempt.payment_method =Some(storage_enums::PaymentMethod::Wallet);- // TODO: Remove redundant update from wallets.- match wallet_data {- api_models::payments::WalletData::PaypalRedirect(_) => pm,- _ => {- let updated_pm = api::PaymentMethodData::Wallet(wallet_data);- vault::Vault::store_payment_method_data_in_locker(- state,- Some(hyperswitch_token),- &updated_pm,- payment_data.payment_intent.customer_id.to_owned(),- enums::PaymentMethod::Wallet,- )- .await?;- Some(updated_pm)- }- }+ pm}- Some(api::PaymentMethodData::BankTransfer(bank_transfer)) => {+ Some(api::PaymentMethodData::BankTransfer(_)) => {payment_data.payment_attempt.payment_method =Some(storage_enums::PaymentMethod::BankTransfer);- let updated_pm = api::PaymentMethodData::BankTransfer(bank_transfer);- vault::Vault::store_payment_method_data_in_locker(- state,- Some(hyperswitch_token),- &updated_pm,- payment_data.payment_intent.customer_id.to_owned(),- enums::PaymentMethod::BankTransfer,- )- .await?;- Some(updated_pm)+ pm}Some(_) => Err(errors::ApiErrorResponse::InternalServerError).into_report()