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 (#7004)
  • Loading branch information
Chethan-rao authored Jan 7, 2025
1 parent c4d36b5 commit d2212cb
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 @@ -3470,12 +3470,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 d2212cb

Please sign in to comment.