mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
feat(connector): [Adyen] implement Alipay HK for Adyen (#1547)
This commit is contained in:
@ -261,6 +261,7 @@ pub enum AdyenPaymentMethod<'a> {
|
||||
AdyenPaypal(Box<AdyenPaypal>),
|
||||
AfterPay(Box<AdyenPayLaterData>),
|
||||
AliPay(Box<AliPayData>),
|
||||
AliPayHk(Box<AliPayHkData>),
|
||||
ApplePay(Box<AdyenApplePay>),
|
||||
BancontactCard(Box<BancontactCardData>),
|
||||
Blik(Box<BlikRedirectionData>),
|
||||
@ -613,6 +614,12 @@ pub struct AliPayData {
|
||||
payment_type: PaymentType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AliPayHkData {
|
||||
#[serde(rename = "type")]
|
||||
payment_type: PaymentType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AdyenGPay {
|
||||
#[serde(rename = "type")]
|
||||
@ -666,6 +673,8 @@ pub enum PaymentType {
|
||||
Affirm,
|
||||
Afterpaytouch,
|
||||
Alipay,
|
||||
#[serde(rename = "alipay_hk")]
|
||||
AlipayHk,
|
||||
Applepay,
|
||||
Blik,
|
||||
Eps,
|
||||
@ -1088,6 +1097,12 @@ impl<'a> TryFrom<&api::WalletData> for AdyenPaymentMethod<'a> {
|
||||
};
|
||||
Ok(AdyenPaymentMethod::AliPay(Box::new(alipay_data)))
|
||||
}
|
||||
api_models::payments::WalletData::AliPayHkRedirect(_) => {
|
||||
let alipay_hk_data = AliPayHkData {
|
||||
payment_type: PaymentType::AlipayHk,
|
||||
};
|
||||
Ok(AdyenPaymentMethod::AliPayHk(Box::new(alipay_hk_data)))
|
||||
}
|
||||
api_models::payments::WalletData::MbWayRedirect(data) => {
|
||||
let mbway_data = MbwayData {
|
||||
payment_type: PaymentType::Mbway,
|
||||
|
||||
@ -164,6 +164,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::payments::AddressDetails,
|
||||
api_models::payments::BankDebitData,
|
||||
api_models::payments::AliPayRedirection,
|
||||
api_models::payments::AliPayHkRedirection,
|
||||
api_models::payments::MbWayRedirection,
|
||||
api_models::payments::MobilePayRedirection,
|
||||
api_models::payments::WeChatPayRedirection,
|
||||
|
||||
Reference in New Issue
Block a user