feat(connector): [MIFINITY] Implement payment flows and Mifinity payment method (#4592)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: kiran.kummari <kiran.kummari@juspay.in>
This commit is contained in:
Swangi Kumari
2024-06-06 17:47:45 +05:30
committed by GitHub
parent 3d9ecd0938
commit 6750be5aee
58 changed files with 766 additions and 383 deletions

View File

@ -20,7 +20,7 @@ use serde::{
ser::Serializer,
Deserialize, Deserializer, Serialize,
};
use time::PrimitiveDateTime;
use time::{Date, PrimitiveDateTime};
use url::Url;
use utoipa::ToSchema;
@ -1604,6 +1604,7 @@ impl GetPaymentMethodType for WalletData {
}
Self::CashappQr(_) => api_enums::PaymentMethodType::Cashapp,
Self::SwishQr(_) => api_enums::PaymentMethodType::Swish,
Self::Mifinity(_) => api_enums::PaymentMethodType::Mifinity,
}
}
}
@ -2415,6 +2416,8 @@ pub enum WalletData {
CashappQr(Box<CashappQr>),
// The wallet data for Swish
SwishQr(SwishQrData),
// The wallet data for Mifinity Ewallet
Mifinity(MifinityData),
}
impl GetAddressFromPaymentMethodData for WalletData {
@ -2441,7 +2444,8 @@ impl GetAddressFromPaymentMethodData for WalletData {
phone: None,
})
}
Self::AliPayQr(_)
Self::Mifinity(_)
| Self::AliPayQr(_)
| Self::AliPayRedirect(_)
| Self::AliPayHkRedirect(_)
| Self::MomoRedirect(_)
@ -2573,6 +2577,14 @@ pub struct TouchNGoRedirection {}
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
pub struct SwishQrData {}
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
pub struct MifinityData {
#[schema(value_type = String)]
pub destination_account_number: Secret<String>,
#[schema(value_type = Date)]
pub date_of_birth: Secret<Date>,
}
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
pub struct GpayTokenizationData {
/// The type of the token