fix: consider status of payment method before filtering wallets in list pm (#7004)

This commit is contained in:
Chethan Rao
2025-01-07 22:37:46 +05:30
committed by GitHub
parent c4d36b506e
commit d2212cb7ea

View File

@ -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
{