mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
fix: parse allowed_payment_method_types only if there is some value p… (#2161)
Co-authored-by: Kashif <kashif@protonmail.com>
This commit is contained in:
@ -1351,9 +1351,11 @@ pub async fn filter_payment_methods(
|
|||||||
payment_intent
|
payment_intent
|
||||||
.allowed_payment_method_types
|
.allowed_payment_method_types
|
||||||
.clone()
|
.clone()
|
||||||
.parse_value("Vec<PaymentMethodType>")
|
.map(|val| val.parse_value("Vec<PaymentMethodType>"))
|
||||||
.map_err(|error| logger::error!(%error, "Failed to deserialize PaymentIntent allowed_payment_method_types"))
|
.transpose()
|
||||||
.ok()
|
.unwrap_or_else(|error| {
|
||||||
|
logger::error!(%error, "Failed to deserialize PaymentIntent allowed_payment_method_types"); None
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
for payment_method_type_info in payment_methods_enabled
|
for payment_method_type_info in payment_methods_enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user