From 737cd984021cab9d4b526e7bb43bcde03f28cdc7 Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Thu, 18 Jan 2024 14:55:02 +0530 Subject: [PATCH] fix cashtocode 4xx webhooks issue --- crates/router/src/connector/cashtocode/transformers.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/router/src/connector/cashtocode/transformers.rs b/crates/router/src/connector/cashtocode/transformers.rs index 9aa6286a963f..8a92956756a8 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 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")]