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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(connectors): [paypal] handle optional vault fields in 3DS CIT responses (#11580)
Swangi Kumari8fd8e3a329e4
diff --git a/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs b/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rsindex a4dc92e823..29a13a19a1 100644--- a/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs@@ -553,10 +553,11 @@ pub struct PaypalVault {}#[derive(Debug, Serialize, Deserialize, Clone)]pub struct PaypalVaultResponse {- id: String,+ id: Option<String>,status: String,- customer: CustomerId,+ customer: Option<CustomerId>,}+#[derive(Debug, Serialize, Deserialize, Clone)]pub struct CustomerId {id: String,@@ -2362,10 +2363,10 @@ whereconnector_mandate_id: match item.response.payment_source.clone() {Some(paypal_source) => match paypal_source {PaymentSourceItemResponse::Paypal(paypal_source) => {- paypal_source.attributes.map(|attr| attr.vault.id)+ paypal_source.attributes.and_then(|attr| attr.vault.id)}PaymentSourceItemResponse::Card(card) => {- card.attributes.map(|attr| attr.vault.id)+ card.attributes.and_then(|attr| attr.vault.id)}PaymentSourceItemResponse::Eps(_)| PaymentSourceItemResponse::Ideal(_) => None,