mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
fix: surcharge related status and rules fix (#2974)
Co-authored-by: Bernard Eugine <114725419+bernard-eugine@users.noreply.github.com>
This commit is contained in:
@ -352,6 +352,9 @@ impl SurchargeDetailsResponse {
|
||||
request_surcharge_details.surcharge_amount == self.surcharge_amount
|
||||
&& request_surcharge_details.tax_amount.unwrap_or(0) == self.tax_on_surcharge_amount
|
||||
}
|
||||
pub fn get_total_surcharge_amount(&self) -> i64 {
|
||||
self.surcharge_amount + self.tax_on_surcharge_amount
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
||||
@ -347,6 +347,9 @@ impl RequestSurchargeDetails {
|
||||
final_amount: original_amount + surcharge_amount + tax_on_surcharge_amount,
|
||||
}
|
||||
}
|
||||
pub fn get_total_surcharge_amount(&self) -> i64 {
|
||||
self.surcharge_amount + self.tax_amount.unwrap_or(0)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy)]
|
||||
|
||||
Reference in New Issue
Block a user