mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	feat(core): enable surcharge support for all connectors (#3109)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -156,6 +156,16 @@ pub struct PaymentAttempt { | ||||
|     pub unified_message: Option<String>, | ||||
| } | ||||
|  | ||||
| impl PaymentAttempt { | ||||
|     pub fn get_total_amount(&self) -> i64 { | ||||
|         self.amount + self.surcharge_amount.unwrap_or(0) + self.tax_amount.unwrap_or(0) | ||||
|     } | ||||
|     pub fn get_total_surcharge_amount(&self) -> Option<i64> { | ||||
|         self.surcharge_amount | ||||
|             .map(|surcharge_amount| surcharge_amount + self.tax_amount.unwrap_or(0)) | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[derive(Clone, Debug, Eq, PartialEq)] | ||||
| pub struct PaymentListFilters { | ||||
|     pub connector: Vec<String>, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Hrithikesh
					Hrithikesh