Skip to content

Commit

Permalink
fix(connector): [Cashtocode] update amount from i64 to f64 in webhook…
Browse files Browse the repository at this point in the history
… payload (#3382)
  • Loading branch information
prasunna09 committed Jan 25, 2024
1 parent 74b5c09 commit e959384
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/router/src/connector/cashtocode/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -314,7 +314,6 @@ impl<F, T>
connector_response_reference_id: None,
incremental_authorization_allowed: None,
}),
amount_captured: Some(item.response.amount),
..item.data
})
}
Expand All @@ -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")]
Expand Down

0 comments on commit e959384

Please sign in to comment.