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): [Cashtocode] update amount from i64 to f64 in webhook payload (#3382)

Prasunna Soppa059e86607dc2
diff --git a/crates/router/src/connector/cashtocode/transformers.rs b/crates/router/src/connector/cashtocode/transformers.rs
index 9aa6286a96..8a92956756 100644
--- a/crates/router/src/connector/cashtocode/transformers.rs
+++ b/crates/router/src/connector/cashtocode/transformers.rs
@@ -193,7 +193,7 @@ pub struct CashtocodePaymentsResponseData {
#[serde(rename_all = "camelCase")]
pub struct CashtocodePaymentsSyncResponse {
pub transaction_id: String,
- pub amount: i64,
+ pub amount: f64,
}
fn get_redirect_form_data(
@@ -314,7 +314,6 @@ impl<F, T>
connector_response_reference_id: None,
incremental_authorization_allowed: None,
}),
- amount_captured: Some(item.response.amount),
..item.data
})
}
@@ -330,7 +329,7 @@ pub struct CashtocodeErrorResponse {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CashtocodeIncomingWebhook {
- pub amount: i64,
+ pub amount: f64,
pub currency: String,
pub foreign_transaction_id: String,
#[serde(rename = "type")]