feat(router): add connector to PaymentsResponse (#145)

This commit is contained in:
ItsMeShashank
2022-12-14 17:19:34 +05:30
committed by GitHub
parent bcf1dd3a24
commit 041654eabc
2 changed files with 2 additions and 0 deletions

View File

@ -367,6 +367,7 @@ pub struct PaymentsResponse {
pub amount: i32, pub amount: i32,
pub amount_capturable: Option<i32>, pub amount_capturable: Option<i32>,
pub amount_received: Option<i32>, pub amount_received: Option<i32>,
pub connector: Option<String>,
pub client_secret: Option<Secret<String>>, pub client_secret: Option<Secret<String>>,
#[serde(with = "common_utils::custom_serde::iso8601::option")] #[serde(with = "common_utils::custom_serde::iso8601::option")]
pub created: Option<PrimitiveDateTime>, pub created: Option<PrimitiveDateTime>,

View File

@ -275,6 +275,7 @@ where
.set_amount(payment_attempt.amount) .set_amount(payment_attempt.amount)
.set_amount_capturable(None) .set_amount_capturable(None)
.set_amount_received(payment_intent.amount_captured) .set_amount_received(payment_intent.amount_captured)
.set_connector(payment_attempt.connector)
.set_client_secret(payment_intent.client_secret.map(masking::Secret::new)) .set_client_secret(payment_intent.client_secret.map(masking::Secret::new))
.set_created(Some(payment_intent.created_at)) .set_created(Some(payment_intent.created_at))
.set_currency(currency) .set_currency(currency)