feat(payment): customer ip field inclusion (#1370)

Co-authored-by: shashank_attarde <shashank.attarde@juspay.in>
This commit is contained in:
Prajjwal Kumar
2023-06-09 12:30:39 +05:30
committed by GitHub
parent 795500797d
commit 11a827a76d
12 changed files with 462 additions and 124 deletions

View File

@ -36,15 +36,15 @@ impl utils::Connector for TrustpayTest {
fn get_default_browser_info() -> BrowserInformation {
BrowserInformation {
color_depth: 24,
java_enabled: false,
java_script_enabled: true,
language: "en-US".to_string(),
screen_height: 1080,
screen_width: 1920,
time_zone: 3600,
accept_header: "*".to_string(),
user_agent: "none".to_string(),
color_depth: Some(24),
java_enabled: Some(false),
java_script_enabled: Some(true),
language: Some("en-US".to_string()),
screen_height: Some(1080),
screen_width: Some(1920),
time_zone: Some(3600),
accept_header: Some("*".to_string()),
user_agent: Some("none".to_string()),
ip_address: None,
}
}

View File

@ -549,15 +549,15 @@ impl Default for PaymentCancelType {
impl Default for BrowserInfoType {
fn default() -> Self {
let data = types::BrowserInformation {
user_agent: "".to_string(),
accept_header: "".to_string(),
language: "nl-NL".to_string(),
color_depth: 24,
screen_height: 723,
screen_width: 1536,
time_zone: 0,
java_enabled: true,
java_script_enabled: true,
user_agent: Some("".to_string()),
accept_header: Some("".to_string()),
language: Some("nl-NL".to_string()),
color_depth: Some(24),
screen_height: Some(723),
screen_width: Some(1536),
time_zone: Some(0),
java_enabled: Some(true),
java_script_enabled: Some(true),
ip_address: Some("127.0.0.1".parse().unwrap()),
};
Self(data)