mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
feat(router): add click_to_pay block in payments sessions response if enabled (#6829)
Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5a85213e21
commit
5aa8ea03a8
@ -5943,6 +5943,8 @@ pub enum SessionToken {
|
||||
OpenBanking(OpenBankingSessionToken),
|
||||
/// The session response structure for Paze
|
||||
Paze(Box<PazeSessionTokenResponse>),
|
||||
/// The sessions response structure for ClickToPay
|
||||
ClickToPay(Box<ClickToPaySessionResponse>),
|
||||
/// Whenever there is no session token response or an error in session response
|
||||
NoSessionTokenReceived,
|
||||
}
|
||||
@ -6981,6 +6983,23 @@ pub struct ExtendedCardInfoResponse {
|
||||
pub payload: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ClickToPaySessionResponse {
|
||||
pub dpa_id: String,
|
||||
pub dpa_name: String,
|
||||
pub locale: String,
|
||||
pub card_brands: Vec<String>,
|
||||
pub acquirer_bin: String,
|
||||
pub acquirer_merchant_id: String,
|
||||
pub merchant_category_code: String,
|
||||
pub merchant_country_code: String,
|
||||
#[schema(value_type = String, example = "38.02")]
|
||||
pub transaction_amount: StringMajorUnit,
|
||||
#[schema(value_type = Currency)]
|
||||
pub transaction_currency_code: common_enums::Currency,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
#[cfg(test)]
|
||||
mod payments_request_api_contract {
|
||||
|
||||
Reference in New Issue
Block a user