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

fix(core): change condition for updating payment method status (#9259)

Sakil Mostak0543e5155524
diff --git a/crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs b/crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs
index 56cf72a622..a96127a123 100644
--- a/crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs
+++ b/crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs
@@ -414,16 +414,16 @@ impl<F: Clone + Send + Sync> Domain<F, ExternalVaultProxyPaymentsRequest, Paymen
merchant_context: &domain::MerchantContext,
payment_data: &mut PaymentConfirmData<F>,
) {
- if let (true, Some(payment_method_id)) = (
+ if let (true, Some(payment_method)) = (
payment_data.payment_attempt.customer_acceptance.is_some(),
- payment_data.payment_attempt.payment_method_id.clone(),
+ payment_data.payment_method.as_ref(),
) {
payment_methods::update_payment_method_status_internal(
state,
merchant_context.get_merchant_key_store(),
merchant_context.get_merchant_account().storage_scheme,
common_enums::PaymentMethodStatus::Active,
- &payment_method_id,
+ payment_method.get_id(),
)
.await
.map_err(|err| router_env::logger::error!(err=?err));