diff --git a/crates/router/src/compatibility/stripe/payment_intents/types.rs b/crates/router/src/compatibility/stripe/payment_intents/types.rs index c08accb519..4202bfcd32 100644 --- a/crates/router/src/compatibility/stripe/payment_intents/types.rs +++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs @@ -24,11 +24,12 @@ pub struct StripeBillingDetails { impl From for payments::Address { fn from(details: StripeBillingDetails) -> Self { Self { - address: details.address, phone: Some(payments::PhoneDetails { number: details.phone, - country_code: None, + country_code: details.address.as_ref().and_then(|a| a.country.clone()), }), + + address: details.address, } } } @@ -104,11 +105,11 @@ pub struct Shipping { impl From for payments::Address { fn from(details: Shipping) -> Self { Self { - address: details.address, phone: Some(payments::PhoneDetails { number: details.phone, - country_code: None, + country_code: details.address.as_ref().and_then(|a| a.country.clone()), }), + address: details.address, } } }