feat(router): add support for Samsung Pay payment method (#5955)

This commit is contained in:
Shankar Singh C
2024-09-20 16:56:24 +05:30
committed by GitHub
parent 5335f2d21c
commit fe15cc79f5
27 changed files with 997 additions and 46 deletions

View File

@ -745,6 +745,10 @@ pub struct MerchantConnectorCreate {
/// In case the merchant needs to store any additional sensitive data
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v2")]
@ -882,6 +886,10 @@ pub struct MerchantConnectorCreate {
/// In case the merchant needs to store any additional sensitive data
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v1")]
@ -1102,6 +1110,10 @@ pub struct MerchantConnectorResponse {
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v2")]
@ -1221,6 +1233,10 @@ pub struct MerchantConnectorResponse {
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v1")]
@ -1327,6 +1343,10 @@ pub struct MerchantConnectorListResponse {
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v1")]
@ -1417,6 +1437,10 @@ pub struct MerchantConnectorListResponse {
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v2")]
@ -1512,6 +1536,28 @@ pub struct MerchantConnectorUpdate {
/// In case the merchant needs to store any additional sensitive data
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
#[serde(deny_unknown_fields)]
pub struct ConnectorWalletDetails {
/// This field contains the Apple Pay certificates and credentials for iOS and Web Apple Pay flow
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(value_type = Option<Object>)]
pub apple_pay_combined: Option<pii::SecretSerdeValue>,
/// This field is for our legacy Apple Pay flow that contains the Apple Pay certificates and credentials for only iOS Apple Pay flow
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(value_type = Option<Object>)]
pub apple_pay: Option<pii::SecretSerdeValue>,
/// This field contains the Samsung Pay certificates and credentials
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(value_type = Option<Object>)]
pub samsung_pay: Option<pii::SecretSerdeValue>,
}
/// Create a new Merchant Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc."
@ -1597,6 +1643,9 @@ pub struct MerchantConnectorUpdate {
/// In case the merchant needs to store any additional sensitive data
#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,
/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}
#[cfg(feature = "v2")]