mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
refactor(process_tracker): Integrate proxy_payments api to process tracker workflow (#7480)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -573,6 +573,24 @@ impl From<api_models::payments::AmountDetails> for payments::AmountDetails {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
impl From<payments::AmountDetails> for api_models::payments::AmountDetailsSetter {
|
||||
fn from(amount_details: payments::AmountDetails) -> Self {
|
||||
Self {
|
||||
order_amount: amount_details.order_amount.into(),
|
||||
currency: amount_details.currency,
|
||||
shipping_cost: amount_details.shipping_cost,
|
||||
order_tax_amount: amount_details
|
||||
.tax_details
|
||||
.and_then(|tax_detail| tax_detail.get_default_tax_amount()),
|
||||
skip_external_tax_calculation: amount_details.skip_external_tax_calculation,
|
||||
skip_surcharge_calculation: amount_details.skip_surcharge_calculation,
|
||||
surcharge_amount: amount_details.surcharge_amount,
|
||||
tax_on_surcharge: amount_details.tax_on_surcharge,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "v2")]
|
||||
impl From<&api_models::payments::PaymentAttemptAmountDetails>
|
||||
for payments::payment_attempt::AttemptAmountDetailsSetter
|
||||
|
||||
Reference in New Issue
Block a user