fix(google_pay): allow custom fields in GpayTokenParameters for google pay via stripe (#1125)

This commit is contained in:
Jagan
2023-05-11 17:52:22 +05:30
committed by GitHub
parent 45ccc410ea
commit f790099368
4 changed files with 58 additions and 7 deletions

View File

@ -724,7 +724,7 @@ pub enum WalletData {
}
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
#[serde(rename_all(serialize = "camelCase", deserialize = "snake_case"))]
#[serde(rename_all = "snake_case")]
pub struct GooglePayWalletData {
/// The type of payment method
#[serde(rename = "type")]
@ -756,7 +756,7 @@ pub struct MbWayRedirection {
}
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
#[serde(rename_all(serialize = "camelCase", deserialize = "snake_case"))]
#[serde(rename_all = "snake_case")]
pub struct GooglePayPaymentMethodInfo {
/// The name of the card network
pub card_network: String,
@ -1464,7 +1464,15 @@ pub struct GpayTokenParameters {
/// The name of the connector
pub gateway: String,
/// The merchant ID registered in the connector associated
pub gateway_merchant_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_merchant_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none", rename = "stripe:version")]
pub stripe_version: Option<String>,
#[serde(
skip_serializing_if = "Option::is_none",
rename = "stripe:publishableKey"
)]
pub stripe_publishable_key: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]