fix(connector): Paypal BankRedirects (Ideal/EPS) (#6864)

This commit is contained in:
awasthi21
2024-12-20 12:19:49 +05:30
committed by GitHub
parent d5710a372f
commit dcd51a7fb8

View File

@ -469,6 +469,21 @@ pub struct PaypalRedirectionResponse {
attributes: Option<AttributeResponse>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct EpsRedirectionResponse {
name: Option<Secret<String>>,
country_code: Option<enums::CountryAlpha2>,
bic: Option<Secret<String>>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct IdealRedirectionResponse {
name: Option<Secret<String>>,
country_code: Option<enums::CountryAlpha2>,
bic: Option<Secret<String>>,
iban_last_chars: Option<Secret<String>>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct AttributeResponse {
vault: PaypalVaultResponse,
@ -518,6 +533,8 @@ pub struct CardVaultResponse {
pub enum PaymentSourceItemResponse {
Card(CardVaultResponse),
Paypal(PaypalRedirectionResponse),
Eps(EpsRedirectionResponse),
Ideal(IdealRedirectionResponse),
}
#[derive(Debug, Serialize)]
@ -1826,6 +1843,8 @@ impl<F, T>
PaymentSourceItemResponse::Card(card) => {
card.attributes.map(|attr| attr.vault.id)
}
PaymentSourceItemResponse::Eps(_)
| PaymentSourceItemResponse::Ideal(_) => None,
},
None => None,
},