mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
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:
@ -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>,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user