Skip to content

Commit

Permalink
feat(connector): [Multisafepay] Use connector_request_reference_id as…
Browse files Browse the repository at this point in the history
… reference to the connector (#2503)
  • Loading branch information
SagarDevAchar authored Oct 9, 2023
1 parent 71cbffb commit c34f1bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/router/src/connector/multisafepay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsRe
.change_context(errors::ConnectorError::FailedToObtainAuthType)?
.api_key
.expose();
let ord_id = req.payment_id.clone();
let ord_id = req.connector_request_reference_id.clone();
Ok(format!("{url}v1/json/orders/{ord_id}?api_key={api_key}"))
}

Expand Down Expand Up @@ -341,7 +341,7 @@ impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsRespon
.change_context(errors::ConnectorError::FailedToObtainAuthType)?
.api_key
.expose();
let ord_id = req.payment_id.clone();
let ord_id = req.connector_request_reference_id.clone();
Ok(format!(
"{url}v1/json/orders/{ord_id}/refunds?api_key={api_key}"
))
Expand Down Expand Up @@ -428,7 +428,7 @@ impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponse
.change_context(errors::ConnectorError::FailedToObtainAuthType)?
.api_key
.expose();
let ord_id = req.payment_id.clone();
let ord_id = req.connector_request_reference_id.clone();
Ok(format!(
"{url}v1/json/orders/{ord_id}/refunds?api_key={api_key}"
))
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/multisafepay/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for MultisafepayPaymentsReques
Ok(Self {
payment_type,
gateway,
order_id: item.payment_id.to_string(),
order_id: item.connector_request_reference_id.to_string(),
currency: item.request.currency.to_string(),
amount: item.request.amount,
description,
Expand Down

0 comments on commit c34f1bf

Please sign in to comment.