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(fiuu): fallback to customer email when billing email is absent for mandate payment (#13215)
Aniket Burman7b823b40439f
diff --git a/crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs b/crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rsindex 6617a4455f..c41d88c9b0 100644--- a/crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs@@ -263,7 +263,10 @@ impl TryFrom<&FiuuRouterData<&PaymentsAuthorizeRouterData>> for FiuuMandateReque.router_data.request.get_card_holder_name_from_additional_payment_method_data()?;- let email = item.router_data.get_billing_email()?;+ let email = item+ .router_data+ .get_billing_email()+ .or(item.router_data.request.get_email())?;let token = Secret::new(item.router_data.request.get_connector_mandate_id()?);let verify_key = auth.verify_key;let recurring_request = FiuuRecurringRequest {@@ -664,7 +667,10 @@ impl TryFrom<(&Card, &PaymentsAuthorizeRouterData)> for FiuuPaymentMethodData {) -> Result<Self, Self::Error> {let (mps_token_status, customer_email) =if item.request.is_customer_initiated_mandate_payment() {- (Some(1), Some(item.get_billing_email()?))+ (+ Some(1),+ Some(item.get_billing_email().or(item.request.get_email())?),+ )} else {(Some(3), None)};