mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	feat(order_details): Adding order_details both inside and outside of metadata, in payments request, for backward compatibility (#1344)
Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com>
This commit is contained in:
		| @ -1,6 +1,6 @@ | ||||
| use std::collections::HashMap; | ||||
|  | ||||
| use api_models::payments::{self, OrderDetails}; | ||||
| use api_models::payments::{self, OrderDetailsWithAmount}; | ||||
| use base64::Engine; | ||||
| use common_utils::{ | ||||
|     date_time, | ||||
| @ -179,7 +179,7 @@ pub trait PaymentsAuthorizeRequestData { | ||||
|     fn is_auto_capture(&self) -> Result<bool, Error>; | ||||
|     fn get_email(&self) -> Result<Email, Error>; | ||||
|     fn get_browser_info(&self) -> Result<types::BrowserInformation, Error>; | ||||
|     fn get_order_details(&self) -> Result<OrderDetails, Error>; | ||||
|     fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error>; | ||||
|     fn get_card(&self) -> Result<api::Card, Error>; | ||||
|     fn get_return_url(&self) -> Result<String, Error>; | ||||
|     fn connector_mandate_id(&self) -> Option<String>; | ||||
| @ -206,7 +206,7 @@ impl PaymentsAuthorizeRequestData for types::PaymentsAuthorizeData { | ||||
|             .clone() | ||||
|             .ok_or_else(missing_field_err("browser_info")) | ||||
|     } | ||||
|     fn get_order_details(&self) -> Result<OrderDetails, Error> { | ||||
|     fn get_order_details(&self) -> Result<Vec<OrderDetailsWithAmount>, Error> { | ||||
|         self.order_details | ||||
|             .clone() | ||||
|             .ok_or_else(missing_field_err("order_details")) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 rishavkar
					rishavkar