mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
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:
@ -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."
|
||||
|
||||
@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user