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(connector): [WorldpayXML] make AFT postcodes optional (#15221)
nithin-juspay1ffa1d948a02
diff --git a/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs b/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rsindex a434ff64dc..efe4ffac63 100644--- a/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs@@ -685,7 +685,8 @@ struct FundingAddress {address1: Secret<String>,#[serde(skip_serializing_if = "Option::is_none")]address2: Option<Secret<String>>,- postal_code: Secret<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ postal_code: Option<Secret<String>>,city: String,#[serde(skip_serializing_if = "Option::is_none")]state: Option<Secret<String>>,@@ -1745,12 +1746,7 @@ fn build_worldpayxml_recipient_party("recipient_details.address.line1",))?,address2: address.line2.clone(),- postal_code: address- .zip- .clone()- .ok_or_else(connector_utils::missing_field_err(- "recipient_details.address.zip",- ))?,+ postal_code: address.zip.clone(),city: address.city.clone()@@ -1810,7 +1806,7 @@ fn build_worldpayxml_sender_party<F, Req, Res>(funding_address: FundingAddress {address1: router_data.get_billing_line1()?,address2: router_data.get_optional_billing_line2(),- postal_code: router_data.get_billing_zip()?,+ postal_code: router_data.get_optional_billing_zip(),city: router_data.get_billing_city()?,state: match country_code {common_enums::CountryAlpha2::US | common_enums::CountryAlpha2::CA => {