mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(connector): [Iatapay] add upi qr support (#4728)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: SamraatBansal <55536657+SamraatBansal@users.noreply.github.com>
This commit is contained in:
@ -1664,7 +1664,10 @@ impl GetPaymentMethodType for CryptoData {
|
||||
|
||||
impl GetPaymentMethodType for UpiData {
|
||||
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
|
||||
api_enums::PaymentMethodType::UpiCollect
|
||||
match self {
|
||||
Self::UpiCollect(_) => api_enums::PaymentMethodType::UpiCollect,
|
||||
Self::UpiIntent(_) => api_enums::PaymentMethodType::UpiIntent,
|
||||
}
|
||||
}
|
||||
}
|
||||
impl GetPaymentMethodType for VoucherData {
|
||||
@ -2119,11 +2122,21 @@ pub struct CryptoData {
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct UpiData {
|
||||
pub enum UpiData {
|
||||
UpiCollect(UpiCollectData),
|
||||
UpiIntent(UpiIntentData),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub struct UpiCollectData {
|
||||
#[schema(value_type = Option<String>, example = "successtest@iata")]
|
||||
pub vpa_id: Option<Secret<String, pii::UpiVpaMaskingStrategy>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct UpiIntentData {}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct SofortBilling {
|
||||
/// The country associated with the billing
|
||||
@ -2960,6 +2973,11 @@ pub enum NextActionData {
|
||||
/// The url for Qr code given by the connector
|
||||
qr_code_url: Option<Url>,
|
||||
},
|
||||
/// Contains url to fetch Qr code data
|
||||
FetchQrCodeInformation {
|
||||
#[schema(value_type = String)]
|
||||
qr_code_fetch_url: Url,
|
||||
},
|
||||
/// Contains the download url and the reference number for transaction
|
||||
DisplayVoucherInformation {
|
||||
#[schema(value_type = String)]
|
||||
@ -3045,6 +3063,11 @@ pub struct SdkNextActionData {
|
||||
pub next_action: NextActionCall,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
pub struct FetchQrCodeInformation {
|
||||
pub qr_code_fetch_url: Url,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
pub struct BankTransferNextStepsData {
|
||||
/// The instructions for performing a bank transfer
|
||||
|
||||
Reference in New Issue
Block a user