feat(payment_link): expose configurations for payment links (#7742)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Kashif
2025-04-09 12:46:15 +05:30
committed by GitHub
parent 0a5d249543
commit b475171dd2
16 changed files with 274 additions and 10 deletions

View File

@ -2895,6 +2895,14 @@ pub struct PaymentLinkConfigRequest {
pub payment_link_ui_rules: Option<HashMap<String, HashMap<String, String>>>,
/// Flag to enable the button only when the payment form is ready for submission
pub enable_button_only_on_form_ready: Option<bool>,
/// Optional header for the SDK's payment form
pub payment_form_header_text: Option<String>,
/// Label type in the SDK's payment form
#[schema(value_type = Option<PaymentLinkSdkLabelType>, example = "floating")]
pub payment_form_label_type: Option<api_enums::PaymentLinkSdkLabelType>,
/// Boolean for controlling whether or not to show the explicit consent for storing cards
#[schema(value_type = Option<PaymentLinkShowSdkTerms>, example = "always")]
pub show_card_terms: Option<api_enums::PaymentLinkShowSdkTerms>,
}
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, PartialEq, ToSchema)]
@ -2982,6 +2990,14 @@ pub struct PaymentLinkConfig {
pub payment_link_ui_rules: Option<HashMap<String, HashMap<String, String>>>,
/// Flag to enable the button only when the payment form is ready for submission
pub enable_button_only_on_form_ready: bool,
/// Optional header for the SDK's payment form
pub payment_form_header_text: Option<String>,
/// Label type in the SDK's payment form
#[schema(value_type = Option<PaymentLinkSdkLabelType>, example = "floating")]
pub payment_form_label_type: Option<api_enums::PaymentLinkSdkLabelType>,
/// Boolean for controlling whether or not to show the explicit consent for storing cards
#[schema(value_type = Option<PaymentLinkShowSdkTerms>, example = "always")]
pub show_card_terms: Option<api_enums::PaymentLinkShowSdkTerms>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)]

View File

@ -8023,6 +8023,9 @@ pub struct PaymentLinkDetails {
pub payment_link_ui_rules: Option<HashMap<String, HashMap<String, String>>>,
pub status: api_enums::IntentStatus,
pub enable_button_only_on_form_ready: bool,
pub payment_form_header_text: Option<String>,
pub payment_form_label_type: Option<api_enums::PaymentLinkSdkLabelType>,
pub show_card_terms: Option<api_enums::PaymentLinkShowSdkTerms>,
}
#[derive(Debug, serde::Serialize, Clone)]
@ -8041,6 +8044,9 @@ pub struct SecurePaymentLinkDetails {
pub sdk_ui_rules: Option<HashMap<String, HashMap<String, String>>>,
pub payment_link_ui_rules: Option<HashMap<String, HashMap<String, String>>>,
pub enable_button_only_on_form_ready: bool,
pub payment_form_header_text: Option<String>,
pub payment_form_label_type: Option<api_enums::PaymentLinkSdkLabelType>,
pub show_card_terms: Option<api_enums::PaymentLinkShowSdkTerms>,
}
#[derive(Debug, serde::Serialize)]