Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(connector): fix amount conversion incase of minor unit (#2793)

chikke srujan34f52260d3fa
diff --git a/crates/router/src/connector/utils.rs b/crates/router/src/connector/utils.rs
index 6f1566a35b..3a8cae3a63 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<String, error_stack::Report<errors::ConnectorError>> {
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)