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

feat(connector): [Dlocal] Use connector_response_reference_id as reference to merchant (#2446)

Sargam Puramf6677b8e9300
diff --git a/crates/router/src/connector/dlocal/transformers.rs b/crates/router/src/connector/dlocal/transformers.rs
index e6db1503e5..8558836372 100644
--- a/crates/router/src/connector/dlocal/transformers.rs
+++ b/crates/router/src/connector/dlocal/transformers.rs
@@ -250,6 +250,7 @@ pub struct DlocalPaymentsResponse {
status: DlocalPaymentStatus,
id: String,
three_dsecure: Option<ThreeDSecureResData>,
+ order_id: String,
}
impl<F, T>
@@ -269,12 +270,12 @@ impl<F, T>
});
let response = types::PaymentsResponseData::TransactionResponse {
- resource_id: types::ResponseId::ConnectorTransactionId(item.response.id),
+ resource_id: types::ResponseId::ConnectorTransactionId(item.response.order_id.clone()),
redirection_data,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
- connector_response_reference_id: None,
+ connector_response_reference_id: Some(item.response.order_id.clone()),
};
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
@@ -288,6 +289,7 @@ impl<F, T>
pub struct DlocalPaymentsSyncResponse {
status: DlocalPaymentStatus,
id: String,
+ order_id: String,
}
impl<F, T>
@@ -307,12 +309,14 @@ impl<F, T>
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
response: Ok(types::PaymentsResponseData::TransactionResponse {
- resource_id: types::ResponseId::ConnectorTransactionId(item.response.id),
+ resource_id: types::ResponseId::ConnectorTransactionId(
+ item.response.order_id.clone(),
+ ),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
- connector_response_reference_id: None,
+ connector_response_reference_id: Some(item.response.order_id.clone()),
}),
..item.data
})
@@ -323,6 +327,7 @@ impl<F, T>
pub struct DlocalPaymentsCaptureResponse {
status: DlocalPaymentStatus,
id: String,
+ order_id: String,
}
impl<F, T>
@@ -342,12 +347,14 @@ impl<F, T>
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
response: Ok(types::PaymentsResponseData::TransactionResponse {
- resource_id: types::ResponseId::ConnectorTransactionId(item.response.id),
+ resource_id: types::ResponseId::ConnectorTransactionId(
+ item.response.order_id.clone(),
+ ),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
- connector_response_reference_id: None,
+ connector_response_reference_id: Some(item.response.order_id.clone()),
}),
..item.data
})
@@ -356,7 +363,7 @@ impl<F, T>
pub struct DlocalPaymentsCancelResponse {
status: DlocalPaymentStatus,
- id: String,
+ order_id: String,
}
impl<F, T>
@@ -376,12 +383,14 @@ impl<F, T>
Ok(Self {
status: enums::AttemptStatus::from(item.response.status),
response: Ok(types::PaymentsResponseData::TransactionResponse {
- resource_id: types::ResponseId::ConnectorTransactionId(item.response.id),
+ resource_id: types::ResponseId::ConnectorTransactionId(
+ item.response.order_id.clone(),
+ ),
redirection_data: None,
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
- connector_response_reference_id: None,
+ connector_response_reference_id: Some(item.response.order_id.clone()),
}),
..item.data
})