refactor(router): infer ip address for online mandates from request headers if absent (#1419)

This commit is contained in:
ItsMeShashank
2023-06-13 15:17:46 +05:30
committed by GitHub
parent b002c97c9c
commit a1a009d796
6 changed files with 68 additions and 42 deletions

View File

@ -615,7 +615,7 @@ impl ForeignTryFrom<(Option<MandateOption>, Option<String>)> for Option<payments
acceptance_type: payments::AcceptanceType::Online,
accepted_at: mandate.accepted_at,
online: Some(payments::OnlineMandate {
ip_address: mandate.ip_address.unwrap_or_default(),
ip_address: mandate.ip_address,
user_agent: mandate.user_agent.unwrap_or_default(),
}),
}),