mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	refactor(fix): [Adyen] Fix bug in Adyen (#1375)
Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com> Co-authored-by: Prasunna Soppa <70575890+prasunna09@users.noreply.github.com>
This commit is contained in:
		| @ -263,6 +263,15 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData { | ||||
| } | ||||
|  | ||||
| pub trait BrowserInformationData { | ||||
|     fn get_accept_header(&self) -> Result<String, Error>; | ||||
|     fn get_language(&self) -> Result<String, Error>; | ||||
|     fn get_screen_height(&self) -> Result<u32, Error>; | ||||
|     fn get_screen_width(&self) -> Result<u32, Error>; | ||||
|     fn get_color_depth(&self) -> Result<u8, Error>; | ||||
|     fn get_user_agent(&self) -> Result<String, Error>; | ||||
|     fn get_time_zone(&self) -> Result<i32, Error>; | ||||
|     fn get_java_enabled(&self) -> Result<bool, Error>; | ||||
|     fn get_java_script_enabled(&self) -> Result<bool, Error>; | ||||
|     fn get_ip_address(&self) -> Result<Secret<String, IpAddress>, Error>; | ||||
| } | ||||
|  | ||||
| @ -273,6 +282,45 @@ impl BrowserInformationData for types::BrowserInformation { | ||||
|             .ok_or_else(missing_field_err("browser_info.ip_address"))?; | ||||
|         Ok(Secret::new(ip_address.to_string())) | ||||
|     } | ||||
|     fn get_accept_header(&self) -> Result<String, Error> { | ||||
|         self.accept_header | ||||
|             .clone() | ||||
|             .ok_or_else(missing_field_err("browser_info.accept_header")) | ||||
|     } | ||||
|     fn get_language(&self) -> Result<String, Error> { | ||||
|         self.language | ||||
|             .clone() | ||||
|             .ok_or_else(missing_field_err("browser_info.language")) | ||||
|     } | ||||
|     fn get_screen_height(&self) -> Result<u32, Error> { | ||||
|         self.screen_height | ||||
|             .ok_or_else(missing_field_err("browser_info.screen_height")) | ||||
|     } | ||||
|     fn get_screen_width(&self) -> Result<u32, Error> { | ||||
|         self.screen_width | ||||
|             .ok_or_else(missing_field_err("browser_info.screen_width")) | ||||
|     } | ||||
|     fn get_color_depth(&self) -> Result<u8, Error> { | ||||
|         self.color_depth | ||||
|             .ok_or_else(missing_field_err("browser_info.color_depth")) | ||||
|     } | ||||
|     fn get_user_agent(&self) -> Result<String, Error> { | ||||
|         self.user_agent | ||||
|             .clone() | ||||
|             .ok_or_else(missing_field_err("browser_info.user_agent")) | ||||
|     } | ||||
|     fn get_time_zone(&self) -> Result<i32, Error> { | ||||
|         self.time_zone | ||||
|             .ok_or_else(missing_field_err("browser_info.time_zone")) | ||||
|     } | ||||
|     fn get_java_enabled(&self) -> Result<bool, Error> { | ||||
|         self.java_enabled | ||||
|             .ok_or_else(missing_field_err("browser_info.java_enabled")) | ||||
|     } | ||||
|     fn get_java_script_enabled(&self) -> Result<bool, Error> { | ||||
|         self.java_script_enabled | ||||
|             .ok_or_else(missing_field_err("browser_info.java_script_enabled")) | ||||
|     } | ||||
| } | ||||
|  | ||||
| pub trait PaymentsCompleteAuthorizeRequestData { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Swangi Kumari
					Swangi Kumari