mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
feat(connector): [Adyen] implement Atome for Adyen (#1590)
Co-authored-by: Sangamesh Kulkarni <59434228+Sangamesh26@users.noreply.github.com> Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com>
This commit is contained in:
@ -303,6 +303,8 @@ pub enum AdyenPaymentMethod<'a> {
|
||||
AliPay(Box<AliPayData>),
|
||||
AliPayHk(Box<AliPayHkData>),
|
||||
ApplePay(Box<AdyenApplePay>),
|
||||
#[serde(rename = "atome")]
|
||||
Atome(Box<AtomeData>),
|
||||
BancontactCard(Box<BancontactCardData>),
|
||||
Bizum(Box<BankRedirectionPMData>),
|
||||
Blik(Box<BlikRedirectionData>),
|
||||
@ -788,6 +790,9 @@ pub struct VippsWalletData {
|
||||
payment_type: PaymentType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AtomeData {}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AdyenPayLaterData {
|
||||
#[serde(rename = "type")]
|
||||
@ -832,6 +837,7 @@ pub enum PaymentType {
|
||||
Alma,
|
||||
Applepay,
|
||||
Bizum,
|
||||
Atome,
|
||||
Blik,
|
||||
ClearPay,
|
||||
Dana,
|
||||
@ -1506,6 +1512,9 @@ impl<'a> TryFrom<(&api::PayLaterData, Option<api_enums::CountryAlpha2>)>
|
||||
payment_type: PaymentType::Alma,
|
||||
})),
|
||||
),
|
||||
api_models::payments::PayLaterData::AtomeRedirect { .. } => {
|
||||
Ok(AdyenPaymentMethod::Atome(Box::new(AtomeData {})))
|
||||
}
|
||||
_ => Err(errors::ConnectorError::NotImplemented("Payment method".to_string()).into()),
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,6 +188,7 @@ impl ForeignFrom<api_enums::PaymentMethodType> for api_enums::PaymentMethod {
|
||||
| api_enums::PaymentMethodType::AfterpayClearpay
|
||||
| api_enums::PaymentMethodType::Klarna
|
||||
| api_enums::PaymentMethodType::PayBright
|
||||
| api_enums::PaymentMethodType::Atome
|
||||
| api_enums::PaymentMethodType::Walley => Self::PayLater,
|
||||
api_enums::PaymentMethodType::Giropay
|
||||
| api_enums::PaymentMethodType::Ideal
|
||||
|
||||
Reference in New Issue
Block a user