Skip to content

Commit

Permalink
feat(connector): [Payeezy] Use connector_response_reference_id as ref…
Browse files Browse the repository at this point in the history
…erence to merchant (#2410)
  • Loading branch information
rootCircle authored Oct 4, 2023
1 parent 3bfea72 commit 485c09d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions crates/router/src/connector/payeezy/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub struct PayeezyPaymentsRequest {
pub currency_code: String,
pub credit_card: PayeezyPaymentMethod,
pub stored_credentials: Option<StoredCredentials>,
pub reference: String,
}

#[derive(Serialize, Debug)]
Expand Down Expand Up @@ -118,6 +119,7 @@ fn get_card_specific_payment_data(
currency_code,
credit_card,
stored_credentials,
reference: item.connector_request_reference_id.clone(),
})
}
fn get_transaction_type_and_stored_creds(
Expand Down Expand Up @@ -252,6 +254,7 @@ pub struct PayeezyPaymentsResponse {
pub gateway_resp_code: String,
pub gateway_message: String,
pub stored_credentials: Option<PaymentsStoredCredentials>,
pub reference: Option<String>,
}

#[derive(Debug, Deserialize)]
Expand Down Expand Up @@ -354,13 +357,17 @@ impl<F, T>
status,
response: Ok(types::PaymentsResponseData::TransactionResponse {
resource_id: types::ResponseId::ConnectorTransactionId(
item.response.transaction_id,
item.response.transaction_id.clone(),
),
redirection_data: None,
mandate_reference,
connector_metadata: metadata,
network_txn_id: None,
connector_response_reference_id: None,
connector_response_reference_id: Some(
item.response
.reference
.unwrap_or(item.response.transaction_id),
),
}),
..item.data
})
Expand Down

0 comments on commit 485c09d

Please sign in to comment.