mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(router): add connector to PaymentsResponse (#145)
This commit is contained in:
@ -367,6 +367,7 @@ pub struct PaymentsResponse {
|
||||
pub amount: i32,
|
||||
pub amount_capturable: Option<i32>,
|
||||
pub amount_received: Option<i32>,
|
||||
pub connector: Option<String>,
|
||||
pub client_secret: Option<Secret<String>>,
|
||||
#[serde(with = "common_utils::custom_serde::iso8601::option")]
|
||||
pub created: Option<PrimitiveDateTime>,
|
||||
|
||||
@ -275,6 +275,7 @@ where
|
||||
.set_amount(payment_attempt.amount)
|
||||
.set_amount_capturable(None)
|
||||
.set_amount_received(payment_intent.amount_captured)
|
||||
.set_connector(payment_attempt.connector)
|
||||
.set_client_secret(payment_intent.client_secret.map(masking::Secret::new))
|
||||
.set_created(Some(payment_intent.created_at))
|
||||
.set_currency(currency)
|
||||
|
||||
Reference in New Issue
Block a user