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): [stripe] support customer-initiated mandate payments and send setup_future_usage for tokenized cards (#10815)
AkshayaFoiger4201e04a8f0f
diff --git a/crates/hyperswitch_connectors/src/connectors/stripe.rs b/crates/hyperswitch_connectors/src/connectors/stripe.rsindex cdef947a27..081397e214 100644--- a/crates/hyperswitch_connectors/src/connectors/stripe.rs+++ b/crates/hyperswitch_connectors/src/connectors/stripe.rs@@ -230,6 +230,7 @@ impl ConnectorValidation for Stripe {PaymentMethodDataType::Sofort,PaymentMethodDataType::Ideal,PaymentMethodDataType::BancontactCard,+ PaymentMethodDataType::MandatePayment,]);utils::is_mandate_supported(pm_data, pm_type, mandate_supported_pmd, self.id())}diff --git a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rsindex 9d75bab7dc..037bf3aa0f 100644--- a/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs@@ -1922,7 +1922,17 @@ impl TryFrom<(&PaymentsAuthorizeRouterData, MinorUnit)> for PaymentIntentRequestpayment_method_types,setup_future_usage,) = if payment_method_token.is_some() {- (None, None, StripeBillingAddress::default(), None, None)+ let setup_future_usage = validate_and_get_setup_future_usage(+ item.request.setup_future_usage,+ item.request.payment_method_type,+ )?;+ (+ None,+ None,+ StripeBillingAddress::default(),+ None,+ setup_future_usage,+ )} else {match item.request