mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(router): add connector_transaction_id in payments response (#1542)
This commit is contained in:
committed by
GitHub
parent
772fc84577
commit
1a8f5ff225
@ -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)]
|
||||
|
||||
@ -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()
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user