mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(connector): Integrate PAZE Wallet (#6030)
This commit is contained in:
@ -1558,6 +1558,10 @@ pub struct ConnectorWalletDetails {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub samsung_pay: Option<pii::SecretSerdeValue>,
|
||||
/// This field contains the Paze certificates and credentials
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[schema(value_type = Option<Object>)]
|
||||
pub paze: 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."
|
||||
|
||||
@ -1930,6 +1930,7 @@ impl GetPaymentMethodType for WalletData {
|
||||
Self::MbWayRedirect(_) => api_enums::PaymentMethodType::MbWay,
|
||||
Self::MobilePayRedirect(_) => api_enums::PaymentMethodType::MobilePay,
|
||||
Self::PaypalRedirect(_) | Self::PaypalSdk(_) => api_enums::PaymentMethodType::Paypal,
|
||||
Self::Paze(_) => api_enums::PaymentMethodType::Paze,
|
||||
Self::SamsungPay(_) => api_enums::PaymentMethodType::SamsungPay,
|
||||
Self::TwintRedirect {} => api_enums::PaymentMethodType::Twint,
|
||||
Self::VippsRedirect {} => api_enums::PaymentMethodType::Vipps,
|
||||
@ -2819,6 +2820,8 @@ pub enum WalletData {
|
||||
PaypalRedirect(PaypalRedirection),
|
||||
/// The wallet data for Paypal
|
||||
PaypalSdk(PayPalWalletData),
|
||||
/// The wallet data for Paze
|
||||
Paze(PazeWalletData),
|
||||
/// The wallet data for Samsung Pay
|
||||
SamsungPay(Box<SamsungPayWalletData>),
|
||||
/// Wallet data for Twint Redirection
|
||||
@ -2879,6 +2882,7 @@ impl GetAddressFromPaymentMethodData for WalletData {
|
||||
| Self::GooglePayRedirect(_)
|
||||
| Self::GooglePayThirdPartySdk(_)
|
||||
| Self::PaypalSdk(_)
|
||||
| Self::Paze(_)
|
||||
| Self::SamsungPay(_)
|
||||
| Self::TwintRedirect {}
|
||||
| Self::VippsRedirect {}
|
||||
@ -2891,6 +2895,13 @@ impl GetAddressFromPaymentMethodData for WalletData {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct PazeWalletData {
|
||||
#[schema(value_type = String)]
|
||||
pub complete_response: Secret<String>,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct SamsungPayWalletData {
|
||||
@ -4932,6 +4943,19 @@ pub struct GpaySessionTokenData {
|
||||
pub data: GpayMetaData,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct PazeSessionTokenData {
|
||||
#[serde(rename = "paze")]
|
||||
pub data: PazeMetadata,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
pub struct PazeMetadata {
|
||||
pub client_id: String,
|
||||
pub client_name: String,
|
||||
pub client_profile_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum SamsungPayCombinedMetadata {
|
||||
@ -5138,10 +5162,23 @@ pub enum SessionToken {
|
||||
ApplePay(Box<ApplepaySessionTokenResponse>),
|
||||
/// Session token for OpenBanking PIS flow
|
||||
OpenBanking(OpenBankingSessionToken),
|
||||
/// The session response structure for Paze
|
||||
Paze(Box<PazeSessionTokenResponse>),
|
||||
/// Whenever there is no session token response or an error in session response
|
||||
NoSessionTokenReceived,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub struct PazeSessionTokenResponse {
|
||||
/// Paze Client ID
|
||||
pub client_id: String,
|
||||
/// Client Name to be displayed on the Paze screen
|
||||
pub client_name: String,
|
||||
/// Paze Client Profile ID
|
||||
pub client_profile_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
|
||||
#[serde(untagged)]
|
||||
pub enum GpaySessionTokenResponse {
|
||||
|
||||
Reference in New Issue
Block a user