Skip to content

Commit

Permalink
fix(router): [Dlocal] connector transaction id fix (#2872)
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-sudheer authored Nov 30, 2023
1 parent ab3dac7 commit 44b1f49
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions crates/router/src/connector/dlocal/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ pub struct DlocalPaymentsResponse {
status: DlocalPaymentStatus,
id: String,
three_dsecure: Option<ThreeDSecureResData>,
order_id: String,
order_id: Option<String>,
}

impl<F, T>
Expand All @@ -323,12 +323,12 @@ impl<F, T>
});

let response = types::PaymentsResponseData::TransactionResponse {
resource_id: types::ResponseId::ConnectorTransactionId(item.response.order_id.clone()),
resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
redirection_data,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: Some(item.response.order_id.clone()),
connector_response_reference_id: item.response.order_id.clone(),
};
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
Expand All @@ -342,7 +342,7 @@ impl<F, T>
pub struct DlocalPaymentsSyncResponse {
status: DlocalPaymentStatus,
id: String,
order_id: String,
order_id: Option<String>,
}

impl<F, T>
Expand All @@ -362,14 +362,12 @@ impl<F, T>
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
response: Ok(types::PaymentsResponseData::TransactionResponse {
resource_id: types::ResponseId::ConnectorTransactionId(
item.response.order_id.clone(),
),
resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: Some(item.response.order_id.clone()),
connector_response_reference_id: item.response.order_id.clone(),
}),
..item.data
})
Expand All @@ -380,7 +378,7 @@ impl<F, T>
pub struct DlocalPaymentsCaptureResponse {
status: DlocalPaymentStatus,
id: String,
order_id: String,
order_id: Option<String>,
}

impl<F, T>
Expand All @@ -400,14 +398,12 @@ impl<F, T>
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
response: Ok(types::PaymentsResponseData::TransactionResponse {
resource_id: types::ResponseId::ConnectorTransactionId(
item.response.order_id.clone(),
),
resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: Some(item.response.order_id.clone()),
connector_response_reference_id: item.response.order_id.clone(),
}),
..item.data
})
Expand Down

0 comments on commit 44b1f49

Please sign in to comment.