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): [ACI] Implement Przelewy24 Bank Redirect (#1064)

Sakil Mostakcef8914372fa
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index b6cc21114f..c2407e1257 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -646,7 +646,10 @@ pub enum BankRedirectData {
// Issuer value corresponds to the bank
issuer: api_enums::BankNames,
},
- Przelewy24 {},
+ Przelewy24 {
+ // Shopper Email
+ email: Email,
+ },
Sofort {
/// The billing details for bank redirection
billing_details: BankRedirectBilling,
diff --git a/crates/router/src/connector/aci/transformers.rs b/crates/router/src/connector/aci/transformers.rs
index fad1ffed0d..dd97e5214f 100644
--- a/crates/router/src/connector/aci/transformers.rs
+++ b/crates/router/src/connector/aci/transformers.rs
@@ -1,5 +1,6 @@
use std::str::FromStr;
+use common_utils::pii::Email;
use error_stack::report;
use masking::Secret;
use reqwest::Url;
@@ -73,6 +74,8 @@ pub struct BankRedirectionPMData {
bank_account_bic: Option<Secret<String>>,
#[serde(rename = "bankAccount.iban")]
bank_account_iban: Option<Secret<String>>,
+ #[serde(rename = "customer.email")]
+ customer_email: Option<Email>,
shopper_result_url: Option<String>,
}
@@ -83,6 +86,9 @@ pub enum PaymentBrand {
Ideal,
Giropay,
Sofortueberweisung,
+ InteracOnline,
+ Przelewy,
+ Trustly,
}
#[derive(Debug, Clone, Eq, PartialEq, Serialize)]
@@ -145,6 +151,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for AciPaymentsRequest {
bank_account_bank_name: None,
bank_account_bic: None,
bank_account_iban: None,
+ customer_email: None,
shopper_result_url: item.request.router_return_url.clone(),
}))
}
@@ -158,6 +165,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for AciPaymentsRequest {
bank_account_bank_name: None,
bank_account_bic: bank_account_bic.clone(),
bank_account_iban: bank_account_iban.clone(),
+ customer_email: None,
shopper_result_url: item.request.router_return_url.clone(),
})),
api_models::payments::BankRedirectData::Ideal { bank_name, .. } => {
@@ -167,6 +175,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for AciPaymentsRequest {
bank_account_bank_name: Some(bank_name.to_string()),
bank_account_bic: None,
bank_account_iban: None,
+ customer_email: None,
shopper_result_url: item.request.router_return_url.clone(),
}))
}
@@ -177,6 +186,18 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for AciPaymentsRequest {
bank_account_bank_name: None,
bank_account_bic: None,
bank_account_iban: None,
+ customer_email: None,
+ shopper_result_url: item.request.router_return_url.clone(),
+ }))
+ }
+ api_models::payments::BankRedirectData::Przelewy24 { email } => {
+ PaymentDetails::BankRedirect(Box::new(BankRedirectionPMData {
+ payment_brand: PaymentBrand::Przelewy,
+ bank_account_country: None,
+ bank_account_bank_name: None,
+ bank_account_bic: None,
+ bank_account_iban: None,
+ customer_email: Some(email.to_owned()),
shopper_result_url: item.request.router_return_url.clone(),
}))
}