Skip to content

Commit

Permalink
refactor(connector): Use connector_request_reference_id for Shift4
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Danylov authored and daniloff200 committed Oct 21, 2023
1 parent 31431e4 commit 8d440b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/router/src/connector/shift4/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ impl<T, F>
types::PaymentsResponseData,
>,
) -> Result<Self, Self::Error> {
let connector_id = types::ResponseId::ConnectorTransactionId(item.response.id.clone());
Ok(Self {
status: enums::AttemptStatus::foreign_from((
item.response.captured,
Expand All @@ -727,7 +728,7 @@ impl<T, F>
item.response.status,
)),
response: Ok(types::PaymentsResponseData::TransactionResponse {
resource_id: types::ResponseId::ConnectorTransactionId(item.response.id),
resource_id: connector_id,
redirection_data: item
.response
.flow
Expand All @@ -737,7 +738,7 @@ impl<T, F>
mandate_reference: None,
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: None,
connector_response_reference_id: Some(item.response.id),
}),
..item.data
})
Expand Down

0 comments on commit 8d440b0

Please sign in to comment.