fix(payment_link): added expires_on in payment response (#3332)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2024-01-16 13:43:19 +05:30
committed by GitHub
parent 58cc8d6109
commit 5ad3f8939a
3 changed files with 14 additions and 0 deletions

View File

@ -2277,6 +2277,11 @@ pub struct PaymentsResponse {
/// List of incremental authorizations happened to the payment /// List of incremental authorizations happened to the payment
pub incremental_authorizations: Option<Vec<IncrementalAuthorizationResponse>>, pub incremental_authorizations: Option<Vec<IncrementalAuthorizationResponse>>,
/// Date Time expiry of the payment
#[schema(example = "2022-09-10T10:11:12Z")]
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub expires_on: Option<PrimitiveDateTime>,
/// Payment Fingerprint /// Payment Fingerprint
pub fingerprint: Option<String>, pub fingerprint: Option<String>,
} }

View File

@ -709,6 +709,7 @@ where
.set_fingerprint(payment_intent.fingerprint_id) .set_fingerprint(payment_intent.fingerprint_id)
.set_authorization_count(payment_intent.authorization_count) .set_authorization_count(payment_intent.authorization_count)
.set_incremental_authorizations(incremental_authorizations_response) .set_incremental_authorizations(incremental_authorizations_response)
.set_expires_on(payment_intent.session_expiry)
.to_owned(), .to_owned(),
headers, headers,
)) ))
@ -775,6 +776,7 @@ where
incremental_authorization_allowed: payment_intent.incremental_authorization_allowed, incremental_authorization_allowed: payment_intent.incremental_authorization_allowed,
authorization_count: payment_intent.authorization_count, authorization_count: payment_intent.authorization_count,
incremental_authorizations: incremental_authorizations_response, incremental_authorizations: incremental_authorizations_response,
expires_on: payment_intent.session_expiry,
..Default::default() ..Default::default()
}, },
headers, headers,

View File

@ -10948,6 +10948,13 @@
"description": "List of incremental authorizations happened to the payment", "description": "List of incremental authorizations happened to the payment",
"nullable": true "nullable": true
}, },
"expires_on": {
"type": "string",
"format": "date-time",
"description": "Date Time expiry of the payment",
"example": "2022-09-10T10:11:12Z",
"nullable": true
},
"fingerprint": { "fingerprint": {
"type": "string", "type": "string",
"description": "Payment Fingerprint", "description": "Payment Fingerprint",