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(payment_methods): Default card fetch to locker call (#2125)
Sarthak Soniffe9009d6525
diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rsindex 6a8f804759..7e68eb23d5 100644--- a/crates/router/src/core/payment_methods/cards.rs+++ b/crates/router/src/core/payment_methods/cards.rs@@ -1921,7 +1921,7 @@ async fn get_card_details(state: &routes::AppState,hyperswitch_token: &str,) -> errors::RouterResult<Option<api::CardDetailFromLocker>> {- let mut card_decrypted =+ let mut _card_decrypted =decrypt::<serde_json::Value, masking::WithType>(pm.payment_method_data.clone(), key).await.change_context(errors::StorageError::DecryptionError)@@ -1934,13 +1934,9 @@ async fn get_card_details(PaymentMethodsData::Card(crd) => api::CardDetailFromLocker::from(crd),});- card_decrypted = if let Some(mut crd) = card_decrypted {- crd.scheme = pm.scheme.clone();- Some(crd)- } else {- Some(get_lookup_key_from_locker(state, hyperswitch_token, pm).await?)- };- Ok(card_decrypted)+ Ok(Some(+ get_lookup_key_from_locker(state, hyperswitch_token, pm).await?,+ ))}pub async fn get_lookup_key_from_locker(