mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
fix: consider status of payment method before filtering wallets in list pm (#7004)
This commit is contained in:
@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user