Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat(connector): [Adyen] implement Kakao for Adyen (#1558)

AkshayaFoiger11ad9beda816
diff --git a/config/development.toml b/config/development.toml
index 0c22c06270..6c01b9546a 100644
--- a/config/development.toml
+++ b/config/development.toml
@@ -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" }
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index cfb6a491fe..9e7b5562e3 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -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 {}
diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs
index af38c66bce..58b5c48b63 100644
--- a/crates/common_enums/src/enums.rs
+++ b/crates/common_enums/src/enums.rs
@@ -574,6 +574,7 @@ pub enum PaymentMethodType {
Ideal,
Interac,
Klarna,
+ KakaoPay,
MbWay,
MobilePay,
Multibanco,
diff --git a/crates/common_enums/src/transformers.rs b/crates/common_enums/src/transformers.rs
index 9958ed865f..33baed2cf9 100644
--- a/crates/common_enums/src/transformers.rs
+++ b/crates/common_enums/src/transformers.rs
@@ -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,
diff --git a/crates/router/src/connector/adyen/transformers.rs b/crates/router/src/connector/adyen/transformers.rs
index cef533dbf9..972d7a6d86 100644
--- a/crates/router/src/connector/adyen/transformers.rs
+++ b/crates/router/src/connector/adyen/transformers.rs
@@ -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,
diff --git a/crates/router/src/openapi.rs b/crates/router/src/openapi.rs
index 3c27f2b3fc..4ede9eca3a 100644
--- a/crates/router/src/openapi.rs
+++ b/crates/router/src/openapi.rs
@@ -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,
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index dcbed91800..12e1922b2a 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -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
diff --git a/openapi/openapi_spec.json b/openapi/openapi_spec.json
index 21a54a769e..1c6690a47f 100644
--- a/openapi/openapi_spec.json
+++ b/openapi/openapi_spec.json
@@ -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": [