Skip to content

Commit

Permalink
fix: consider status of payment method before filtering wallets in li…
Browse files Browse the repository at this point in the history
…st pm (#7012)
  • Loading branch information
Chethan-rao authored Jan 9, 2025
1 parent ad6f730 commit df67b9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/router/src/core/payment_methods/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3478,12 +3478,14 @@ pub async fn list_payment_methods(
.any(|mca| mca.payment_method == enums::PaymentMethod::Wallet);
if wallet_pm_exists {
match db
.find_payment_method_by_customer_id_merchant_id_list(
.find_payment_method_by_customer_id_merchant_id_status(
&((&state).into()),
&key_store,
&customer.customer_id,
merchant_account.get_id(),
&customer.customer_id,
merchant_account.get_id(),
common_enums::PaymentMethodStatus::Active,
None,
merchant_account.storage_scheme,
)
.await
{
Expand Down

0 comments on commit df67b9d

Please sign in to comment.