feat(payments): [Payment links] add showCardFormByDefault config for payment links (#6663)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Debarati Ghatak
2024-11-29 15:38:22 +05:30
committed by GitHub
parent 19cbcdd979
commit b1d1073389
13 changed files with 57 additions and 4 deletions

View File

@ -2673,6 +2673,9 @@ pub struct PaymentLinkConfigRequest {
/// Hide card nickname field option for payment link
#[schema(default = false, example = true)]
pub hide_card_nickname_field: Option<bool>,
/// Show card form by default for payment link
#[schema(default = true, example = true)]
pub show_card_form_by_default: Option<bool>,
/// Dynamic details related to merchant to be rendered in payment link
pub transaction_details: Option<Vec<PaymentLinkTransactionDetails>>,
}
@ -2718,6 +2721,8 @@ pub struct PaymentLinkConfig {
pub enabled_saved_payment_method: bool,
/// Hide card nickname field option for payment link
pub hide_card_nickname_field: bool,
/// Show card form by default for payment link
pub show_card_form_by_default: bool,
/// A list of allowed domains (glob patterns) where this link can be embedded / opened from
pub allowed_domains: Option<HashSet<String>>,
/// Dynamic details related to merchant to be rendered in payment link

View File

@ -6670,6 +6670,7 @@ pub struct PaymentLinkDetails {
pub sdk_layout: String,
pub display_sdk_only: bool,
pub hide_card_nickname_field: bool,
pub show_card_form_by_default: bool,
pub locale: Option<String>,
pub transaction_details: Option<Vec<admin::PaymentLinkTransactionDetails>>,
}
@ -6678,6 +6679,7 @@ pub struct PaymentLinkDetails {
pub struct SecurePaymentLinkDetails {
pub enabled_saved_payment_method: bool,
pub hide_card_nickname_field: bool,
pub show_card_form_by_default: bool,
#[serde(flatten)]
pub payment_link_details: PaymentLinkDetails,
}