mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(connector): [Adyen] implement Kakao for Adyen (#1558)
Co-authored-by: Sangamesh Kulkarni <59434228+Sangamesh26@users.noreply.github.com>
This commit is contained in:
@ -243,6 +243,8 @@ bacs = {country = "UK", currency = "GBP"}
|
||||
sepa = {country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT", currency = "EUR"}
|
||||
ali_pay_hk = {country = "HK", currency = "HKD"}
|
||||
bizum = {country = "ES", currency = "EUR"}
|
||||
go_pay = {country = "ID", currency = "IDR"}
|
||||
kakao_pay = {country = "KR", currency = "KRW"}
|
||||
|
||||
[pm_filters.braintree]
|
||||
paypal = { currency = "AUD,BRL,CAD,CNY,CZK,DKK,EUR,HKD,HUF,ILS,JPY,MYR,MXN,TWD,NZD,NOK,PHP,PLN,GBP,RUB,SGD,SEK,CHF,THB,USD" }
|
||||
|
||||
@ -952,6 +952,8 @@ pub enum WalletData {
|
||||
AliPayRedirect(AliPayRedirection),
|
||||
/// The wallet data for Ali Pay HK redirect
|
||||
AliPayHkRedirect(AliPayHkRedirection),
|
||||
/// The wallet data for KakaoPay redirect
|
||||
KakaoPayRedirect(KakaoPayRedirection),
|
||||
/// The wallet data for GoPay redirect
|
||||
GoPayRedirect(GoPayRedirection),
|
||||
/// The wallet data for Apple pay
|
||||
@ -1040,6 +1042,9 @@ pub struct AliPayRedirection {}
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct AliPayHkRedirection {}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct KakaoPayRedirection {}
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct GoPayRedirection {}
|
||||
|
||||
|
||||
@ -574,6 +574,7 @@ pub enum PaymentMethodType {
|
||||
Ideal,
|
||||
Interac,
|
||||
Klarna,
|
||||
KakaoPay,
|
||||
MbWay,
|
||||
MobilePay,
|
||||
Multibanco,
|
||||
|
||||
@ -1557,6 +1557,7 @@ impl From<PaymentMethodType> for PaymentMethod {
|
||||
PaymentMethodType::GoPay => Self::Wallet,
|
||||
PaymentMethodType::Ideal => Self::BankRedirect,
|
||||
PaymentMethodType::Klarna => Self::PayLater,
|
||||
PaymentMethodType::KakaoPay => Self::Wallet,
|
||||
PaymentMethodType::MbWay => Self::Wallet,
|
||||
PaymentMethodType::MobilePay => Self::Wallet,
|
||||
PaymentMethodType::Multibanco => Self::BankTransfer,
|
||||
|
||||
@ -288,6 +288,7 @@ pub enum AdyenPaymentMethod<'a> {
|
||||
#[serde(rename = "gopay_wallet")]
|
||||
GoPay(Box<GoPayData>),
|
||||
Ideal(Box<BankRedirectionWithIssuer<'a>>),
|
||||
Kakaopay(Box<KakaoPayData>),
|
||||
Mandate(Box<AdyenMandate>),
|
||||
Mbway(Box<MbwayData>),
|
||||
MobilePay(Box<MobilePayData>),
|
||||
@ -643,6 +644,9 @@ pub struct AliPayHkData {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct GoPayData {}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct KakaoPayData {}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct AdyenGPay {
|
||||
#[serde(rename = "type")]
|
||||
@ -715,6 +719,7 @@ pub enum PaymentType {
|
||||
GoPay,
|
||||
Ideal,
|
||||
Klarna,
|
||||
Kakaopay,
|
||||
Mbway,
|
||||
MobilePay,
|
||||
#[serde(rename = "onlineBanking_CZ")]
|
||||
@ -1191,6 +1196,10 @@ impl<'a> TryFrom<&api::WalletData> for AdyenPaymentMethod<'a> {
|
||||
let go_pay_data = GoPayData {};
|
||||
Ok(AdyenPaymentMethod::GoPay(Box::new(go_pay_data)))
|
||||
}
|
||||
api_models::payments::WalletData::KakaoPayRedirect(_) => {
|
||||
let kakao_pay_data = KakaoPayData {};
|
||||
Ok(AdyenPaymentMethod::Kakaopay(Box::new(kakao_pay_data)))
|
||||
}
|
||||
api_models::payments::WalletData::MbWayRedirect(data) => {
|
||||
let mbway_data = MbwayData {
|
||||
payment_type: PaymentType::Mbway,
|
||||
@ -1685,7 +1694,7 @@ impl<'a> TryFrom<(&types::PaymentsAuthorizeRouterData, &api::WalletData)>
|
||||
let channel = get_channel_type(&item.request.payment_method_type);
|
||||
let (recurring_processing_model, store_payment_method, shopper_reference) =
|
||||
get_recurring_processing_model(item)?;
|
||||
let return_url = item.request.get_return_url()?;
|
||||
let return_url = item.request.get_router_return_url()?;
|
||||
let shopper_email = get_shopper_email(&item.request, store_payment_method.is_some())?;
|
||||
Ok(AdyenPaymentRequest {
|
||||
amount,
|
||||
|
||||
@ -170,6 +170,7 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
api_models::payments::BankDebitData,
|
||||
api_models::payments::AliPayQr,
|
||||
api_models::payments::AliPayRedirection,
|
||||
api_models::payments::KakaoPayRedirection,
|
||||
api_models::payments::AliPayHkRedirection,
|
||||
api_models::payments::GoPayRedirection,
|
||||
api_models::payments::MbWayRedirection,
|
||||
|
||||
@ -176,7 +176,8 @@ impl ForeignFrom<api_enums::PaymentMethodType> for api_enums::PaymentMethod {
|
||||
| api_enums::PaymentMethodType::SamsungPay
|
||||
| api_enums::PaymentMethodType::Twint
|
||||
| api_enums::PaymentMethodType::WeChatPay
|
||||
| api_enums::PaymentMethodType::GoPay => Self::Wallet,
|
||||
| api_enums::PaymentMethodType::GoPay
|
||||
| api_enums::PaymentMethodType::KakaoPay => Self::Wallet,
|
||||
api_enums::PaymentMethodType::Affirm
|
||||
| api_enums::PaymentMethodType::AfterpayClearpay
|
||||
| api_enums::PaymentMethodType::Klarna
|
||||
|
||||
@ -4627,6 +4627,9 @@
|
||||
"requires_capture"
|
||||
]
|
||||
},
|
||||
"KakaoPayRedirection": {
|
||||
"type": "object"
|
||||
},
|
||||
"KlarnaSessionTokenResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -6809,6 +6812,7 @@
|
||||
"ideal",
|
||||
"interac",
|
||||
"klarna",
|
||||
"kakao_pay",
|
||||
"mb_way",
|
||||
"mobile_pay",
|
||||
"multibanco",
|
||||
@ -8911,6 +8915,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kakao_pay_redirect"
|
||||
],
|
||||
"properties": {
|
||||
"kakao_pay_redirect": {
|
||||
"$ref": "#/components/schemas/KakaoPayRedirection"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user