Skip to content

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

feat(compatibility): add multiuse mandates support in stripe compatibility (#3425)

AkshayaFoiger4a8104e5f8dd
diff --git a/crates/router/src/compatibility/stripe/payment_intents/types.rs b/crates/router/src/compatibility/stripe/payment_intents/types.rs
index 38007a3110..51f938d445 100644
--- a/crates/router/src/compatibility/stripe/payment_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs
@@ -738,9 +738,25 @@ impl ForeignTryFrom<(Option<MandateData>, Option<String>)> for Option<payments::
metadata: None,
},
)),
- StripeMandateType::MultiUse => Some(payments::MandateType::MultiUse(None)),
+ StripeMandateType::MultiUse => Some(payments::MandateType::MultiUse(Some(
+ payments::MandateAmountData {
+ amount: mandate.amount.unwrap_or_default(),
+ currency,
+ start_date: mandate.start_date,
+ end_date: mandate.end_date,
+ metadata: None,
+ },
+ ))),
},
- None => Some(api_models::payments::MandateType::MultiUse(None)),
+ None => Some(api_models::payments::MandateType::MultiUse(Some(
+ payments::MandateAmountData {
+ amount: mandate.amount.unwrap_or_default(),
+ currency,
+ start_date: mandate.start_date,
+ end_date: mandate.end_date,
+ metadata: None,
+ },
+ ))),
},
customer_acceptance: Some(payments::CustomerAcceptance {
acceptance_type: payments::AcceptanceType::Online,