feat(router): add connector_transaction_id in payments response (#1542)

This commit is contained in:
Sai Harsha Vardhan
2023-06-27 11:21:15 +05:30
committed by GitHub
parent 772fc84577
commit 1a8f5ff225
2 changed files with 6 additions and 0 deletions

View File

@ -1392,6 +1392,10 @@ pub struct PaymentsResponse {
/// Any user defined fields can be passed here.
#[schema(value_type = Option<Object>, example = r#"{ "udf1": "some-value", "udf2": "some-value" }"#)]
pub udf: Option<pii::SecretSerdeValue>,
/// A unique identifier for a payment provided by the connector
#[schema(value_type = Option<String>, example = "993672945374576J")]
pub connector_transaction_id: Option<String>,
}
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]

View File

@ -465,6 +465,7 @@ where
)
.set_ephemeral_key(ephemeral_key_option.map(ForeignFrom::foreign_from))
.set_udf(payment_intent.udf)
.set_connector_transaction_id(payment_attempt.connector_transaction_id)
.to_owned(),
)
}
@ -509,6 +510,7 @@ where
metadata: payment_intent.metadata,
order_details: payment_intent.order_details,
udf: payment_intent.udf,
connector_transaction_id: payment_attempt.connector_transaction_id,
..Default::default()
}),
});