From 34f52260d3fa68b54e5b46207afaf2ad07a8d8ba Mon Sep 17 00:00:00 2001 From: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:04:10 +0530 Subject: [PATCH] fix(connector): fix amount conversion incase of minor unit (#2793) Co-authored-by: preetamrevankar <132073736+preetamrevankar@users.noreply.github.com> --- crates/router/src/connector/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs index 6f1566a35b0d..3a8cae3a631e 100644 --- a/crates/router/src/connector/utils.rs +++ b/crates/router/src/connector/utils.rs @@ -1077,7 +1077,7 @@ pub fn get_amount_as_string( currency: diesel_models::enums::Currency, ) -> Result> { let amount = match currency_unit { - types::api::CurrencyUnit::Minor => to_currency_lower_unit(amount.to_string(), currency)?, + types::api::CurrencyUnit::Minor => amount.to_string(), types::api::CurrencyUnit::Base => to_currency_base_unit(amount, currency)?, }; Ok(amount)