feat(core): google pay decrypt flow (#6991)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Gnanasundari24 <118818938+Gnanasundari24@users.noreply.github.com>
This commit is contained in:
Sakil Mostak
2025-02-05 15:24:57 +05:30
committed by GitHub
parent 6fee3011ea
commit e0ec27d936
39 changed files with 1158 additions and 27 deletions

View File

@ -1468,6 +1468,10 @@ pub struct ConnectorWalletDetails {
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(value_type = Option<Object>)]
pub paze: Option<pii::SecretSerdeValue>,
/// This field contains the Google Pay certificates and credentials
#[serde(skip_serializing_if = "Option::is_none")]
#[schema(value_type = Option<Object>)]
pub google_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."

View File

@ -5984,6 +5984,57 @@ pub struct SessionTokenForSimplifiedApplePay {
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayWalletDetails {
pub google_pay: GooglePayDetails,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayDetails {
pub provider_details: GooglePayProviderDetails,
}
// Google Pay Provider Details can of two types: GooglePayMerchantDetails or GooglePayHyperSwitchDetails
// GooglePayHyperSwitchDetails is not implemented yet
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(untagged)]
pub enum GooglePayProviderDetails {
GooglePayMerchantDetails(GooglePayMerchantDetails),
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayMerchantDetails {
pub merchant_info: GooglePayMerchantInfo,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayMerchantInfo {
pub merchant_name: String,
pub tokenization_specification: GooglePayTokenizationSpecification,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayTokenizationSpecification {
#[serde(rename = "type")]
pub tokenization_type: GooglePayTokenizationType,
pub parameters: GooglePayTokenizationParameters,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum GooglePayTokenizationType {
PaymentGateway,
Direct,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayTokenizationParameters {
pub gateway: String,
pub public_key: Secret<String>,
pub private_key: Secret<String>,
pub recipient_id: Option<Secret<String>>,
}
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
#[serde(tag = "wallet_name")]
#[serde(rename_all = "snake_case")]