mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
fix(router): return collect_billing_details_from_wallet_connector if always_collect_billing_details_from_wallet_connector is false in merchant payment method list (#5854)
This commit is contained in:
@ -3656,23 +3656,29 @@ pub async fn list_payment_methods(
|
|||||||
api_surcharge_decision_configs::MerchantSurchargeConfigs::default()
|
api_surcharge_decision_configs::MerchantSurchargeConfigs::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
let collect_shipping_details_from_wallets = business_profile
|
let collect_shipping_details_from_wallets =
|
||||||
.as_ref()
|
business_profile.as_ref().and_then(|business_profile| {
|
||||||
.and_then(|business_profile| {
|
if business_profile
|
||||||
business_profile.always_collect_shipping_details_from_wallet_connector
|
.always_collect_shipping_details_from_wallet_connector
|
||||||
})
|
.unwrap_or(false)
|
||||||
.or(business_profile.as_ref().and_then(|business_profile| {
|
{
|
||||||
business_profile.collect_shipping_details_from_wallet_connector
|
business_profile.always_collect_shipping_details_from_wallet_connector
|
||||||
}));
|
} else {
|
||||||
|
business_profile.collect_shipping_details_from_wallet_connector
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let collect_billing_details_from_wallets = business_profile
|
let collect_billing_details_from_wallets =
|
||||||
.as_ref()
|
business_profile.as_ref().and_then(|business_profile| {
|
||||||
.and_then(|business_profile| {
|
if business_profile
|
||||||
business_profile.always_collect_billing_details_from_wallet_connector
|
.always_collect_billing_details_from_wallet_connector
|
||||||
})
|
.unwrap_or(false)
|
||||||
.or(business_profile.as_ref().and_then(|business_profile| {
|
{
|
||||||
business_profile.collect_billing_details_from_wallet_connector
|
business_profile.always_collect_billing_details_from_wallet_connector
|
||||||
}));
|
} else {
|
||||||
|
business_profile.collect_billing_details_from_wallet_connector
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let is_tax_connector_enabled = business_profile.as_ref().map_or(false, |business_profile| {
|
let is_tax_connector_enabled = business_profile.as_ref().map_or(false, |business_profile| {
|
||||||
business_profile.get_is_tax_connector_enabled()
|
business_profile.get_is_tax_connector_enabled()
|
||||||
|
|||||||
Reference in New Issue
Block a user